Python setuptools.depends.get_module_constant() Examples
The following are 6
code examples of setuptools.depends.get_module_constant().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
setuptools.depends
, or try the search function
.
Example #1
Source File: __init__.py From pledgeservice with Apache License 2.0 | 5 votes |
def testModuleExtract(self): if not hasattr(dep, 'get_module_constant'): # skip on non-bytecode platforms return from email import __version__ self.assertEqual( dep.get_module_constant('email','__version__'), __version__ ) self.assertEqual( dep.get_module_constant('sys','version'), sys.version ) self.assertEqual( dep.get_module_constant('setuptools.tests','__doc__'),__doc__ )
Example #2
Source File: __init__.py From oss-ftp with MIT License | 5 votes |
def testModuleExtract(self): if not hasattr(dep, 'get_module_constant'): # skip on non-bytecode platforms return from email import __version__ self.assertEqual( dep.get_module_constant('email','__version__'), __version__ ) self.assertEqual( dep.get_module_constant('sys','version'), sys.version ) self.assertEqual( dep.get_module_constant('setuptools.tests','__doc__'),__doc__ )
Example #3
Source File: test_depends.py From setuptools with MIT License | 5 votes |
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
Example #4
Source File: test_setuptools.py From setuptools with MIT License | 5 votes |
def testModuleExtract(self): from json import __version__ assert dep.get_module_constant('json', '__version__') == __version__ assert dep.get_module_constant('sys', 'version') == sys.version assert dep.get_module_constant( 'setuptools.tests.test_setuptools', '__doc__') == __doc__
Example #5
Source File: __init__.py From Flask with Apache License 2.0 | 5 votes |
def testModuleExtract(self): if not hasattr(dep, 'get_module_constant'): # skip on non-bytecode platforms return from email import __version__ self.assertEqual( dep.get_module_constant('email','__version__'), __version__ ) self.assertEqual( dep.get_module_constant('sys','version'), sys.version ) self.assertEqual( dep.get_module_constant('setuptools.tests','__doc__'),__doc__ )
Example #6
Source File: __init__.py From Flask with Apache License 2.0 | 5 votes |
def testModuleExtract(self): if not hasattr(dep, 'get_module_constant'): # skip on non-bytecode platforms return from email import __version__ self.assertEqual( dep.get_module_constant('email','__version__'), __version__ ) self.assertEqual( dep.get_module_constant('sys','version'), sys.version ) self.assertEqual( dep.get_module_constant('setuptools.tests','__doc__'),__doc__ )