test_depends.py 425 B

12345678910111213141516
  1. import sys
  2. from setuptools import depends
  3. class TestGetModuleConstant:
  4. def test_basic(self):
  5. """
  6. Invoke get_module_constant on a module in
  7. the test package.
  8. """
  9. mod_name = 'setuptools.tests.mod_with_constant'
  10. val = depends.get_module_constant(mod_name, 'value')
  11. assert val == 'three, sir!'
  12. assert 'setuptools.tests.mod_with_constant' not in sys.modules