diff options
author | Guido van Rossum <guido@python.org> | 2007-10-16 18:12:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-10-16 18:12:55 (GMT) |
commit | 3172c5d263eeffff1e89d03d79be3ccc1d60fbde (patch) | |
tree | a35e103b36b684c4682ded57236199d6a0ecee4b /Lib/test/test_sys.py | |
parent | 60d241f135f10312f5a638846659d7e471f6cac9 (diff) | |
download | cpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.zip cpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.tar.gz cpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.tar.bz2 |
Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index e737047..ddf1876 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -126,7 +126,7 @@ class SysModuleTest(unittest.TestCase): def test_getdefaultencoding(self): self.assertRaises(TypeError, sys.getdefaultencoding, 42) # can't check more than the type, as the user might have changed it - self.assert_(isinstance(sys.getdefaultencoding(), basestring)) + self.assert_(isinstance(sys.getdefaultencoding(), str)) # testing sys.settrace() is done in test_trace.py # testing sys.setprofile() is done in test_profile.py @@ -275,15 +275,15 @@ class SysModuleTest(unittest.TestCase): self.assert_(isinstance(sys.argv, list)) self.assert_(sys.byteorder in ("little", "big")) self.assert_(isinstance(sys.builtin_module_names, tuple)) - self.assert_(isinstance(sys.copyright, basestring)) - self.assert_(isinstance(sys.exec_prefix, basestring)) - self.assert_(isinstance(sys.executable, basestring)) + self.assert_(isinstance(sys.copyright, str)) + self.assert_(isinstance(sys.exec_prefix, str)) + self.assert_(isinstance(sys.executable, str)) self.assert_(isinstance(sys.hexversion, int)) self.assert_(isinstance(sys.maxint, int)) self.assert_(isinstance(sys.maxunicode, int)) - self.assert_(isinstance(sys.platform, basestring)) - self.assert_(isinstance(sys.prefix, basestring)) - self.assert_(isinstance(sys.version, basestring)) + self.assert_(isinstance(sys.platform, str)) + self.assert_(isinstance(sys.prefix, str)) + self.assert_(isinstance(sys.version, str)) vi = sys.version_info self.assert_(isinstance(vi, tuple)) self.assertEqual(len(vi), 5) |