From ca0ee009f81a460b483c7e451e58dfdcd7787045 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Sep 2019 16:39:57 +0100 Subject: Add test capturing failure. Ref #1787. --- setuptools/tests/test_config.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'setuptools/tests') diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index bc97664d..42187138 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -819,6 +819,18 @@ class TestOptions: ] assert sorted(dist.data_files) == sorted(expected) + def test_python_requires_invalid(self, tmpdir): + fake_env( + tmpdir, + DALS(""" + [options] + python_requires=invalid + """), + ) + with pytest.raises(DistutilsOptionError): + with get_dist(tmpdir) as dist: + dist.parse_config_files() + saved_dist_init = _Distribution.__init__ -- cgit v1.2.1