diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-24 16:58:36 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-24 16:58:36 +0000 |
commit | b0f5adc3f4e098b1744eeac65fc830fb1df2b8ab (patch) | |
tree | e2936db9f8e1194464aeb7e9546d5a892f7239c7 /Lib/test/test_posixpath.py | |
parent | f14c7fc33da8ba3aa28bbb7b0305ea12ab30be09 (diff) | |
download | cpython-git-b0f5adc3f4e098b1744eeac65fc830fb1df2b8ab.tar.gz |
use assert[Not]IsInstance where appropriate
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r-- | Lib/test/test_posixpath.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 0c54d83b82..cea4bd7d02 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -335,15 +335,15 @@ class PosixPathTest(unittest.TestCase): except ImportError: pass else: - self.assertTrue(isinstance(posixpath.expanduser("~/"), basestring)) + self.assertIsInstance(posixpath.expanduser("~/"), basestring) # if home directory == root directory, this test makes no sense if posixpath.expanduser("~") != '/': self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") ) - self.assertTrue(isinstance(posixpath.expanduser("~root/"), basestring)) - self.assertTrue(isinstance(posixpath.expanduser("~foo/"), basestring)) + self.assertIsInstance(posixpath.expanduser("~root/"), basestring) + self.assertIsInstance(posixpath.expanduser("~foo/"), basestring) with test_support.EnvironmentVarGuard() as env: env['HOME'] = '/' @@ -383,8 +383,8 @@ class PosixPathTest(unittest.TestCase): # Issue 5827: Make sure normpath preserves unicode for path in (u'', u'.', u'/', u'\\', u'///foo/.//bar//'): - self.assertTrue(isinstance(posixpath.normpath(path), unicode), - 'normpath() returned str instead of unicode') + self.assertIsInstance(posixpath.normpath(path), unicode, + 'normpath() returned str instead of unicode') self.assertRaises(TypeError, posixpath.normpath) |