[Python-checkins] r57003 - sandbox/trunk/import_in_py/tests/test_chained_importer.py sandbox/trunk/import_in_py/tests/test_fs_importer.py
brett.cannon
python-checkins at python.org
Tue Aug 14 06:14:10 CEST 2007
Author: brett.cannon
Date: Tue Aug 14 06:14:10 2007
New Revision: 57003
Modified:
sandbox/trunk/import_in_py/tests/test_chained_importer.py
sandbox/trunk/import_in_py/tests/test_fs_importer.py
Log:
Note tests that still need to be written.
Modified: sandbox/trunk/import_in_py/tests/test_chained_importer.py
==============================================================================
--- sandbox/trunk/import_in_py/tests/test_chained_importer.py (original)
+++ sandbox/trunk/import_in_py/tests/test_chained_importer.py Tue Aug 14 06:14:10 2007
@@ -12,6 +12,7 @@
def test_single_hook(self):
# A single hook argument should work as expected.
+ # Also tests acceptance of a relative path.
hook = importlib.chaining_fs_path_hook(mock_importlib.SucceedImporter())
self.assert_(hook('.'))
hook = importlib.chaining_fs_path_hook(mock_importlib.PassImporter())
Modified: sandbox/trunk/import_in_py/tests/test_fs_importer.py
==============================================================================
--- sandbox/trunk/import_in_py/tests/test_fs_importer.py (original)
+++ sandbox/trunk/import_in_py/tests/test_fs_importer.py Tue Aug 14 06:14:10 2007
@@ -15,17 +15,6 @@
import warnings
-class MockFileImporter(importlib.FileImporter):
-
- # Identity function.
- _loader = lambda x: x
-
- def __init__(self, ext=['.test'], pkg=False, path_entry=os.getcwd()):
- self._file_types = ext
- self._possible_package = pkg
- super(self.__class__, self).__init__(path_entry)
-
-
class PyFileImporterTests(TestPyPycPackages):
"""Test the PyFileImporterTests.
@@ -98,6 +87,25 @@
self.assert_(found is None)
self.assert_(issubclass(w.category, ImportWarning))
self.assert_(str(w.message).endswith("missing __init__"))
+
+ def test_package_before_module(self):
+ # A package should always be found before a module with the same name.
+ raise NotImplementedError
+
+ def test_module_case_sensitivity(self):
+ # Case-sensitivity for searching after a module needs support.
+ raise NotImplementedError
+
+ def test_package_case_sensitivity(self):
+ # Packages should be properly support for their case-sensitivity.
+ raise NotImplementedError
+
+
+class ExtensionFileImporterTests(unittest.TestCase):
+
+ def test_basic(self):
+ # Finding an extension module should work.
+ raise NotImplementedError
@@ -395,7 +403,7 @@
def test_main():
- test_support.run_unittest(PyFileImporterTests)
+ test_support.run_unittest(PyFileImporterTests, ExtensionFileImporterTests)
#test_support.run_unittest(FileSystemFactoryTests, FileSystemImporterTests,
# FileSystemLoaderBlackBoxTests, FileSystemLoaderWhiteBoxTests)
More information about the Python-checkins
mailing list