summaryrefslogtreecommitdiff
path: root/setuptools/tests/config
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-05-04 10:14:38 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-05-04 10:14:38 +0100
commitf8bf8bf50d174882208be5e8ec090316481612c3 (patch)
treef6cd81653968fd59963baed9cbfd20e9599d7672 /setuptools/tests/config
parentddb8844eac49e0bf3b4f20067b425ffeac1531a2 (diff)
downloadpython-setuptools-git-f8bf8bf50d174882208be5e8ec090316481612c3.tar.gz
Capture expectations about overwritten dependencies in test
This is discussed in issue 3300.
Diffstat (limited to 'setuptools/tests/config')
-rw-r--r--setuptools/tests/config/test_apply_pyprojecttoml.py9
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 045d7f40..acb07f10 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".