diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-12-28 17:03:33 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-12-28 20:19:17 -0500 |
| commit | 6a960cb9e8cf17385e3b8a52d46cf71a9747e19d (patch) | |
| tree | 7585319f1f645356741cf781a2a95579635e2854 /setuptools | |
| parent | 6d69dd73b900cff84ee142ad82967dd025a75b72 (diff) | |
| download | python-setuptools-git-6a960cb9e8cf17385e3b8a52d46cf71a9747e19d.tar.gz | |
Add tests capturing failure of depends.get_module_constant on Python 3.6. Ref #866.
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/tests/mod_with_constant.py | 1 | ||||
| -rw-r--r-- | setuptools/tests/test_depends.py | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/setuptools/tests/mod_with_constant.py b/setuptools/tests/mod_with_constant.py new file mode 100644 index 00000000..ef755dd1 --- /dev/null +++ b/setuptools/tests/mod_with_constant.py @@ -0,0 +1 @@ +value = 'three, sir!' diff --git a/setuptools/tests/test_depends.py b/setuptools/tests/test_depends.py new file mode 100644 index 00000000..e0cfa880 --- /dev/null +++ b/setuptools/tests/test_depends.py @@ -0,0 +1,16 @@ +import sys + +from setuptools import depends + + +class TestGetModuleConstant: + + def test_basic(self): + """ + Invoke get_module_constant on a module in + the test package. + """ + mod_name = 'setuptools.tests.mod_with_constant' + val = depends.get_module_constant(mod_name, 'value') + assert val == 'three, sir!' + assert 'setuptools.tests.mod_with_constant' not in sys.modules |
