diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-30 22:57:08 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-30 22:57:08 (GMT) |
commit | 5c8da86f3a515ce1a6d5f27fd15e3c5f4d8e931e (patch) | |
tree | 41f38aca16748628d53906337f06fdf087f52314 /Lib/test/test_posixpath.py | |
parent | be96cf608fa656d7e53144cf85082ed5661e8c13 (diff) | |
download | cpython-5c8da86f3a515ce1a6d5f27fd15e3c5f4d8e931e.zip cpython-5c8da86f3a515ce1a6d5f27fd15e3c5f4d8e931e.tar.gz cpython-5c8da86f3a515ce1a6d5f27fd15e3c5f4d8e931e.tar.bz2 |
convert usage of fail* to assert*
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r-- | Lib/test/test_posixpath.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 0a0a48b..3e8ffa9 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -26,7 +26,7 @@ class PosixPathTest(unittest.TestCase): safe_rmdir(test_support.TESTFN + suffix) def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def test_normcase(self): # Check that normcase() is idempotent @@ -134,8 +134,8 @@ class PosixPathTest(unittest.TestCase): for s1 in testlist: for s2 in testlist: p = posixpath.commonprefix([s1, s2]) - self.assert_(s1.startswith(p)) - self.assert_(s2.startswith(p)) + self.assertTrue(s1.startswith(p)) + self.assertTrue(s2.startswith(p)) if s1 != s2: n = len(p) self.assertNotEqual(s1[n:n+1], s2[n:n+1]) @@ -163,7 +163,7 @@ class PosixPathTest(unittest.TestCase): f.close() self.assertEqual(d, "foobar") - self.assert_( + self.assertTrue( posixpath.getctime(test_support.TESTFN) <= posixpath.getmtime(test_support.TESTFN) ) @@ -335,15 +335,15 @@ class PosixPathTest(unittest.TestCase): except ImportError: pass else: - self.assert_(isinstance(posixpath.expanduser("~/"), basestring)) + self.assertTrue(isinstance(posixpath.expanduser("~/"), basestring)) # if home directory == root directory, this test makes no sense if posixpath.expanduser("~") != '/': self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") ) - self.assert_(isinstance(posixpath.expanduser("~root/"), basestring)) - self.assert_(isinstance(posixpath.expanduser("~foo/"), basestring)) + self.assertTrue(isinstance(posixpath.expanduser("~root/"), basestring)) + self.assertTrue(isinstance(posixpath.expanduser("~foo/"), basestring)) with test_support.EnvironmentVarGuard() as env: env['HOME'] = '/' @@ -384,12 +384,12 @@ class PosixPathTest(unittest.TestCase): self.assertRaises(TypeError, posixpath.normpath) def test_abspath(self): - self.assert_("foo" in posixpath.abspath("foo")) + self.assertTrue("foo" in posixpath.abspath("foo")) self.assertRaises(TypeError, posixpath.abspath) def test_realpath(self): - self.assert_("foo" in realpath("foo")) + self.assertTrue("foo" in realpath("foo")) self.assertRaises(TypeError, posixpath.realpath) if hasattr(os, "symlink"): |