[Python-checkins] r52157 - sandbox/trunk/import_in_py/test_importer.py
brett.cannon
python-checkins at python.org
Thu Oct 5 01:10:05 CEST 2006
Author: brett.cannon
Date: Thu Oct 5 01:10:05 2006
New Revision: 52157
Modified:
sandbox/trunk/import_in_py/test_importer.py
Log:
Add a test for BuiltinImporter to make sure exception is raised if
load_module() is called with an argument for path.
Modified: sandbox/trunk/import_in_py/test_importer.py
==============================================================================
--- sandbox/trunk/import_in_py/test_importer.py (original)
+++ sandbox/trunk/import_in_py/test_importer.py Thu Oct 5 01:10:05 2006
@@ -38,6 +38,11 @@
self.failUnless(sys_module)
self.failUnless(hasattr(sys_module, 'version'))
+ def test_load_module_no_path_argument(self):
+ # TypeError should be raise if 'path' argument set.
+ self.failUnlessRaises(TypeError, importer.BuiltinImporter.load_module,
+ 'sys', '')
+
class FrozenImporterTests(unittest.TestCase):
More information about the Python-checkins
mailing list