diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-05 15:11:24 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-05 15:11:24 -0700 |
commit | aa05f70c6053e0e106a53c1af1c69ec39735807b (patch) | |
tree | 75c5069d6ce3fffcf6c368dd18f7ff2259152f8a /pym | |
parent | Add a fake _test_ option to myopts that can be used for conditional test code. (diff) | |
download | portage-multirepo-aa05f70c6053e0e106a53c1af1c69ec39735807b.tar.gz portage-multirepo-aa05f70c6053e0e106a53c1af1c69ec39735807b.tar.bz2 portage-multirepo-aa05f70c6053e0e106a53c1af1c69ec39735807b.zip |
Add a test case for lazyimport._preload_portage_submodules().
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/tests/lazyimport/__init__.py | 0 | ||||
-rw-r--r-- | pym/portage/tests/lazyimport/__test__ | 0 | ||||
-rw-r--r-- | pym/portage/tests/lazyimport/test_preload_portage_submodules.py | 16 |
3 files changed, 16 insertions, 0 deletions
diff --git a/pym/portage/tests/lazyimport/__init__.py b/pym/portage/tests/lazyimport/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pym/portage/tests/lazyimport/__init__.py diff --git a/pym/portage/tests/lazyimport/__test__ b/pym/portage/tests/lazyimport/__test__ new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pym/portage/tests/lazyimport/__test__ diff --git a/pym/portage/tests/lazyimport/test_preload_portage_submodules.py b/pym/portage/tests/lazyimport/test_preload_portage_submodules.py new file mode 100644 index 00000000..9d20ebac --- /dev/null +++ b/pym/portage/tests/lazyimport/test_preload_portage_submodules.py @@ -0,0 +1,16 @@ +# Copyright 2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +import portage +from portage.tests import TestCase + +class PreloadPortageSubmodulesTestCase(TestCase): + + def testPreloadPortageSubmodules(self): + """ + Verify that _preload_portage_submodules() doesn't leave any + remaining proxies that refer to the portage.* namespace. + """ + portage.proxy.lazyimport._preload_portage_submodules() + for name in portage.proxy.lazyimport._module_proxies: + self.assertEqual(name.startswith('portage.'), False) |