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_tempfile.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_tempfile.py')
-rw-r--r-- | Lib/test/test_tempfile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py index 3e4f803..8d91927 100644 --- a/Lib/test/test_tempfile.py +++ b/Lib/test/test_tempfile.py @@ -143,7 +143,7 @@ class test__candidate_tempdir_list(TC): self.failIf(len(cand) == 0) for c in cand: - self.assert_(isinstance(c, basestring), + self.assert_(isinstance(c, str), "%s is not a string" % c) def test_wanted_dirs(self): @@ -328,7 +328,7 @@ class test_gettempprefix(TC): # gettempprefix returns a nonempty prefix string p = tempfile.gettempprefix() - self.assert_(isinstance(p, basestring)) + self.assert_(isinstance(p, str)) self.assert_(len(p) > 0) def test_usable_template(self): @@ -463,7 +463,7 @@ class test_mkdtemp(TC): extant[i] = self.do_create(pre="aa") finally: for i in extant: - if(isinstance(i, basestring)): + if(isinstance(i, str)): os.rmdir(i) def test_choose_directory(self): |