Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
97c8a07f
Commit
97c8a07f
authored
Jan 27, 2009
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make importlib.test.finder_tests an ABC.
parent
c49715f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
Lib/importlib/test/finder_tests.py
Lib/importlib/test/finder_tests.py
+14
-14
No files found.
Lib/importlib/test/finder_tests.py
View file @
97c8a07f
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment