Python test.support.modules_setup() Examples
The following are 10
code examples of test.support.modules_setup().
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
test.support
, or try the search function
.
Example #1
Source File: util.py From pipenv with MIT License | 5 votes |
def modules_setup(): return sys.modules.copy(),
Example #2
Source File: util.py From pipenv with MIT License | 5 votes |
def setUp(self): modules = modules_setup() self.addCleanup(modules_cleanup, *modules)
Example #3
Source File: test_pkg.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def setUp(self): self.root = None self.pkgname = None self.syspath = list(sys.path) self.modules_before = support.modules_setup()
Example #4
Source File: test_zipimport.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def setUp(self): self.path = sys.path[:] self.meta_path = sys.meta_path[:] self.path_hooks = sys.path_hooks[:] sys.path_importer_cache.clear() self.modules_before = support.modules_setup()
Example #5
Source File: test_pkg.py From ironpython3 with Apache License 2.0 | 5 votes |
def setUp(self): self.root = None self.pkgname = None self.syspath = list(sys.path) self.modules_before = support.modules_setup()
Example #6
Source File: test_zipimport.py From ironpython3 with Apache License 2.0 | 5 votes |
def setUp(self): self.path = sys.path[:] self.meta_path = sys.meta_path[:] self.path_hooks = sys.path_hooks[:] sys.path_importer_cache.clear() self.modules_before = support.modules_setup()
Example #7
Source File: test_pkg.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def setUp(self): self.root = None self.pkgname = None self.syspath = list(sys.path) self.modules_before = support.modules_setup()
Example #8
Source File: test_zipimport.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def setUp(self): self.path = sys.path[:] self.meta_path = sys.meta_path[:] self.path_hooks = sys.path_hooks[:] sys.path_importer_cache.clear() self.modules_before = support.modules_setup()
Example #9
Source File: test_zipimport.py From android_universal with MIT License | 5 votes |
def setUp(self): self.path = sys.path[:] self.meta_path = sys.meta_path[:] self.path_hooks = sys.path_hooks[:] sys.path_importer_cache.clear() self.modules_before = support.modules_setup()
Example #10
Source File: test_sundry.py From android_universal with MIT License | 5 votes |
def test_sundry(self): old_modules = support.modules_setup() try: for fn in os.listdir(scriptsdir): if not fn.endswith('.py'): continue name = fn[:-3] if name in self.skiplist: continue import_tool(name) finally: # Unload all modules loaded in this test support.modules_cleanup(*old_modules)