summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/test/test_util.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-13 08:51:18 (GMT)
committerGeorg Brandl <georg@python.org>2009-08-13 08:51:18 (GMT)
commitab91fdef1f1e556203a2eee98ba7d379e4790de9 (patch)
tree6f8f00dc18cc5f2801a675df277c2c595eb85ec8 /Lib/importlib/test/test_util.py
parentef82be368abdea8e8032500e7ecc3a22f5f07851 (diff)
downloadcpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.zip
cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.gz
cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.bz2
Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
Diffstat (limited to 'Lib/importlib/test/test_util.py')
-rw-r--r--Lib/importlib/test/test_util.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/importlib/test/test_util.py b/Lib/importlib/test/test_util.py
index 706128a..406477d 100644
--- a/Lib/importlib/test/test_util.py
+++ b/Lib/importlib/test/test_util.py
@@ -29,8 +29,8 @@ class ModuleForLoaderTests(unittest.TestCase):
module_name = 'a.b.c'
with test_util.uncache(module_name):
module = self.return_module(module_name)
- self.assert_(module_name in sys.modules)
- self.assert_(isinstance(module, types.ModuleType))
+ self.assertTrue(module_name in sys.modules)
+ self.assertTrue(isinstance(module, types.ModuleType))
self.assertEqual(module.__name__, module_name)
def test_reload(self):
@@ -40,7 +40,7 @@ class ModuleForLoaderTests(unittest.TestCase):
with test_util.uncache(name):
sys.modules[name] = module
returned_module = self.return_module(name)
- self.assert_(sys.modules[name] is returned_module)
+ self.assertTrue(sys.modules[name] is returned_module)
def test_new_module_failure(self):
# Test that a module is removed from sys.modules if added but an
@@ -48,7 +48,7 @@ class ModuleForLoaderTests(unittest.TestCase):
name = 'a.b.c'
with test_util.uncache(name):
self.raise_exception(name)
- self.assert_(name not in sys.modules)
+ self.assertTrue(name not in sys.modules)
def test_reload_failure(self):
# Test that a failure on reload leaves the module in-place.
@@ -57,7 +57,7 @@ class ModuleForLoaderTests(unittest.TestCase):
with test_util.uncache(name):
sys.modules[name] = module
self.raise_exception(name)
- self.assert_(sys.modules[name] is module)
+ self.assertTrue(sys.modules[name] is module)
class SetPackageTests(unittest.TestCase):
@@ -71,7 +71,7 @@ class SetPackageTests(unittest.TestCase):
fxn = lambda: module
wrapped = util.set_package(fxn)
wrapped()
- self.assert_(hasattr(module, '__package__'))
+ self.assertTrue(hasattr(module, '__package__'))
self.assertEqual(expect, module.__package__)
def test_top_level(self):