[Python-checkins] r68992 - python/branches/py3k/Lib/importlib/test/finder_tests.py

brett.cannon python-checkins at python.org
Tue Jan 27 02:34:30 CET 2009


Author: brett.cannon
Date: Tue Jan 27 02:34:30 2009
New Revision: 68992

Log:
Make importlib.test.finder_tests an ABC.


Modified:
   python/branches/py3k/Lib/importlib/test/finder_tests.py

Modified: python/branches/py3k/Lib/importlib/test/finder_tests.py
==============================================================================
--- python/branches/py3k/Lib/importlib/test/finder_tests.py	(original)
+++ python/branches/py3k/Lib/importlib/test/finder_tests.py	Tue Jan 27 02:34:30 2009
@@ -1,39 +1,39 @@
-# top-level.
-# Package.
-# module in pacakge.
-# Package within a package.
-# At least one tests with 'path'.
-# Module that is not handled.
-
+import abc
 import unittest
 
 
-class FinderTests(unittest.TestCase):
+class FinderTests(unittest.TestCase, metaclass=abc.ABCMeta):
 
     """Basic tests for a finder to pass."""
 
+    @abc.abstractmethod
     def test_module(self):
         # Test importing a top-level module.
-        raise NotImplementedError
+        pass
 
+    @abc.abstractmethod
     def test_package(self):
         # Test importing a package.
-        raise NotImplementedError
+        pass
 
+    @abc.abstractmethod
     def test_module_in_package(self):
         # Test importing a module contained within a package.
         # A value for 'path' should be used if for a meta_path finder.
-        raise NotImplementedError
+        pass
 
+    @abc.abstractmethod
     def test_package_in_package(self):
         # Test importing a subpackage.
         # A value for 'path' should be used if for a meta_path finder.
-        raise NotImplementedError
+        pass
 
+    @abc.abstractmethod
     def test_package_over_module(self):
         # Test that packages are chosen over modules.
-        raise NotImplementedError
+        pass
 
+    @abc.abstractmethod
     def test_failure(self):
         # Test trying to find a module that cannot be handled.
-        raise NotImplementedError
+        pass


More information about the Python-checkins mailing list