aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-09-11 16:52:58 +0100
committerJason R. Coombs <jaraco@jaraco.com>2019-09-11 16:52:58 +0100
commitb31777cd50c7cb59b4ef6c22bd014f0229ef32fa (patch)
treea958ea712ff6a42181e6940ff3c216a249843065 /setuptools/tests
parentca0ee009f81a460b483c7e451e58dfdcd7787045 (diff)
downloadexternal_python_setuptools-b31777cd50c7cb59b4ef6c22bd014f0229ef32fa.tar.gz
external_python_setuptools-b31777cd50c7cb59b4ef6c22bd014f0229ef32fa.tar.bz2
external_python_setuptools-b31777cd50c7cb59b4ef6c22bd014f0229ef32fa.zip
Add more tests for valid behavior. Expand exception, any should do.
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/test_config.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py
index 42187138..1b94a586 100644
--- a/setuptools/tests/test_config.py
+++ b/setuptools/tests/test_config.py
@@ -819,6 +819,28 @@ class TestOptions:
]
assert sorted(dist.data_files) == sorted(expected)
+ def test_python_requires_simple(self, tmpdir):
+ fake_env(
+ tmpdir,
+ DALS("""
+ [options]
+ python_requires=>=2.7
+ """),
+ )
+ with get_dist(tmpdir) as dist:
+ dist.parse_config_files()
+
+ def test_python_requires_compound(self, tmpdir):
+ fake_env(
+ tmpdir,
+ DALS("""
+ [options]
+ python_requires=>=2.7,!=3.0.*
+ """),
+ )
+ with get_dist(tmpdir) as dist:
+ dist.parse_config_files()
+
def test_python_requires_invalid(self, tmpdir):
fake_env(
tmpdir,
@@ -827,7 +849,7 @@ class TestOptions:
python_requires=invalid
"""),
)
- with pytest.raises(DistutilsOptionError):
+ with pytest.raises(Exception):
with get_dist(tmpdir) as dist:
dist.parse_config_files()