summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/test/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib/test/builtin')
-rw-r--r--Lib/importlib/test/builtin/test_finder.py6
-rw-r--r--Lib/importlib/test/builtin/test_loader.py12
2 files changed, 9 insertions, 9 deletions
diff --git a/Lib/importlib/test/builtin/test_finder.py b/Lib/importlib/test/builtin/test_finder.py
index ef8e8fe..40f690e 100644
--- a/Lib/importlib/test/builtin/test_finder.py
+++ b/Lib/importlib/test/builtin/test_finder.py
@@ -14,7 +14,7 @@ class FinderTests(abc.FinderTests):
# Common case.
with util.uncache(builtin_util.NAME):
found = machinery.BuiltinImporter.find_module(builtin_util.NAME)
- self.assert_(found)
+ self.assertTrue(found)
def test_package(self):
# Built-in modules cannot be a package.
@@ -35,14 +35,14 @@ class FinderTests(abc.FinderTests):
def test_failure(self):
assert 'importlib' not in sys.builtin_module_names
loader = machinery.BuiltinImporter.find_module('importlib')
- self.assert_(loader is None)
+ self.assertTrue(loader is None)
def test_ignore_path(self):
# The value for 'path' should always trigger a failed import.
with util.uncache(builtin_util.NAME):
loader = machinery.BuiltinImporter.find_module(builtin_util.NAME,
['pkg'])
- self.assert_(loader is None)
+ self.assertTrue(loader is None)
diff --git a/Lib/importlib/test/builtin/test_loader.py b/Lib/importlib/test/builtin/test_loader.py
index cfedb5d..dff00ce 100644
--- a/Lib/importlib/test/builtin/test_loader.py
+++ b/Lib/importlib/test/builtin/test_loader.py
@@ -18,10 +18,10 @@ class LoaderTests(abc.LoaderTests):
def verify(self, module):
"""Verify that the module matches against what it should have."""
- self.assert_(isinstance(module, types.ModuleType))
+ self.assertTrue(isinstance(module, types.ModuleType))
for attr, value in self.verification.items():
self.assertEqual(getattr(module, attr), value)
- self.assert_(module.__name__ in sys.modules)
+ self.assertTrue(module.__name__ in sys.modules)
load_module = staticmethod(lambda name:
machinery.BuiltinImporter.load_module(name))
@@ -49,7 +49,7 @@ class LoaderTests(abc.LoaderTests):
with util.uncache(builtin_util.NAME):
module1 = self.load_module(builtin_util.NAME)
module2 = self.load_module(builtin_util.NAME)
- self.assert_(module1 is module2)
+ self.assertTrue(module1 is module2)
def test_unloadable(self):
name = 'dssdsdfff'
@@ -70,17 +70,17 @@ class InspectLoaderTests(unittest.TestCase):
def test_get_code(self):
# There is no code object.
result = machinery.BuiltinImporter.get_code(builtin_util.NAME)
- self.assert_(result is None)
+ self.assertTrue(result is None)
def test_get_source(self):
# There is no source.
result = machinery.BuiltinImporter.get_source(builtin_util.NAME)
- self.assert_(result is None)
+ self.assertTrue(result is None)
def test_is_package(self):
# Cannot be a package.
result = machinery.BuiltinImporter.is_package(builtin_util.NAME)
- self.assert_(not result)
+ self.assertTrue(not result)
def test_not_builtin(self):
# Modules not built-in should raise ImportError.