diff options
| author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-05-16 18:33:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-16 18:33:26 +0100 |
| commit | aec2215be6711c850339484cd7f47d542a6c06a1 (patch) | |
| tree | 4729ed05c45abf5b46d84e8997e86f216ff2e5d5 /setuptools/tests | |
| parent | fd072dcf4dfcf5c737139c9f7546952ecd9f9767 (diff) | |
| parent | 583cb93dfe38151b17e152e961da5643ca4d49d3 (diff) | |
| download | python-setuptools-git-aec2215be6711c850339484cd7f47d542a6c06a1.tar.gz | |
Remove residual dependencies from setup.py when dependencies are set in pyproject.toml (#3306)
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/config/test_apply_pyprojecttoml.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/setuptools/tests/config/test_apply_pyprojecttoml.py b/setuptools/tests/config/test_apply_pyprojecttoml.py index 4f541697..28643f0c 100644 --- a/setuptools/tests/config/test_apply_pyprojecttoml.py +++ b/setuptools/tests/config/test_apply_pyprojecttoml.py @@ -257,6 +257,15 @@ class TestPresetField: dist_value = _some_attrgetter(f"metadata.{attr}", attr)(dist) assert dist_value == value + def test_warning_overwritten_dependencies(self, tmp_path): + src = "[project]\nname='pkg'\nversion='0.1'\ndependencies=['click']\n" + pyproject = tmp_path / "pyproject.toml" + pyproject.write_text(src, encoding="utf-8") + dist = makedist(tmp_path, install_requires=["wheel"]) + with pytest.warns(match="`install_requires` overwritten"): + dist = pyprojecttoml.apply_configuration(dist, pyproject) + assert "wheel" not in dist.install_requires + def test_optional_dependencies_dont_remove_env_markers(self, tmp_path): """ Internally setuptools converts dependencies with markers to "extras". |
