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
e7387b47
Commit
e7387b47
authored
Feb 01, 2013
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for fix of issue #17098
parent
0ecd30b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
Lib/test/test_importlib/test_api.py
Lib/test/test_importlib/test_api.py
+12
-1
No files found.
Lib/test/test_importlib/test_api.py
View file @
e7387b47
...
@@ -4,6 +4,7 @@ import importlib
...
@@ -4,6 +4,7 @@ import importlib
from
importlib
import
machinery
from
importlib
import
machinery
import
sys
import
sys
from
test
import
support
from
test
import
support
import
types
import
unittest
import
unittest
...
@@ -175,12 +176,22 @@ class FrozenImportlibTests(unittest.TestCase):
...
@@ -175,12 +176,22 @@ class FrozenImportlibTests(unittest.TestCase):
machinery
.
FrozenImporter
))
machinery
.
FrozenImporter
))
class
StartupTests
(
unittest
.
TestCase
):
def
test_everyone_has___loader__
(
self
):
# Issue #17098: all modules should have __loader__ defined.
for
name
,
module
in
sys
.
modules
.
items
():
if
isinstance
(
module
,
types
.
ModuleType
):
self
.
assertTrue
(
hasattr
(
module
,
'__loader__'
),
'{!r} lacks a __loader__ attribute'
.
format
(
name
))
def
test_main
():
def
test_main
():
from
test.support
import
run_unittest
from
test.support
import
run_unittest
run_unittest
(
ImportModuleTests
,
run_unittest
(
ImportModuleTests
,
FindLoaderTests
,
FindLoaderTests
,
InvalidateCacheTests
,
InvalidateCacheTests
,
FrozenImportlibTests
)
FrozenImportlibTests
,
StartupTests
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
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