summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tempfile.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-24 19:26:24 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-24 19:26:24 (GMT)
commite96159335f6bb26615b57f880bf90440ed0123e4 (patch)
tree273325221fdef15629ebc63287c4772a3af40879 /Lib/test/test_tempfile.py
parentf41d29a8ebc27aafc18b6850648f1faa918e0e5d (diff)
downloadcpython-e96159335f6bb26615b57f880bf90440ed0123e4.zip
cpython-e96159335f6bb26615b57f880bf90440ed0123e4.tar.gz
cpython-e96159335f6bb26615b57f880bf90440ed0123e4.tar.bz2
Merged revisions 77727 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line use assert[Not]IsInstance where appropriate ........
Diffstat (limited to 'Lib/test/test_tempfile.py')
-rw-r--r--Lib/test/test_tempfile.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py
index 0076c48..de65158 100644
--- a/Lib/test/test_tempfile.py
+++ b/Lib/test/test_tempfile.py
@@ -142,8 +142,7 @@ class test__candidate_tempdir_list(TC):
self.assertFalse(len(cand) == 0)
for c in cand:
- self.assertTrue(isinstance(c, str),
- "%s is not a string" % c)
+ self.assertIsInstance(c, str)
def test_wanted_dirs(self):
# _candidate_tempdir_list contains the expected directories
@@ -184,7 +183,7 @@ class test__get_candidate_names(TC):
def test_retval(self):
# _get_candidate_names returns a _RandomNameSequence object
obj = tempfile._get_candidate_names()
- self.assertTrue(isinstance(obj, tempfile._RandomNameSequence))
+ self.assertIsInstance(obj, tempfile._RandomNameSequence)
def test_same_thing(self):
# _get_candidate_names always returns the same object
@@ -326,7 +325,7 @@ class test_gettempprefix(TC):
# gettempprefix returns a nonempty prefix string
p = tempfile.gettempprefix()
- self.assertTrue(isinstance(p, str))
+ self.assertIsInstance(p, str)
self.assertTrue(len(p) > 0)
def test_usable_template(self):