summaryrefslogtreecommitdiff
path: root/Lib/test/test_file.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-03-23 13:20:39 +0000
committerEzio Melotti <ezio.melotti@gmail.com>2010-03-23 13:20:39 +0000
commitc0fd6ffd4f66d97faa23e4f0d0e659a3e5833a46 (patch)
treeea8fecbc7985fbd2df85552fc1e8900ee8fc89fc /Lib/test/test_file.py
parente67bbfb6efb3e3626e57d74368786260059460b7 (diff)
downloadcpython-git-c0fd6ffd4f66d97faa23e4f0d0e659a3e5833a46.tar.gz
Merged revisions 73824,78887,78895,78900,79024 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73824 | ezio.melotti | 2009-07-04 04:18:08 +0300 (Sat, 04 Jul 2009) | 1 line #6398 typo: versio. -> version. ........ r78887 | ezio.melotti | 2010-03-13 02:15:36 +0200 (Sat, 13 Mar 2010) | 1 line fix broken links ........ r78895 | ezio.melotti | 2010-03-13 03:21:34 +0200 (Sat, 13 Mar 2010) | 1 line #8011: use exc.tb_lineno instead of traceback.tb_lineno() and pep8ify variable names. ........ r78900 | ezio.melotti | 2010-03-13 06:39:51 +0200 (Sat, 13 Mar 2010) | 1 line Silence compiler warnings. ........ r79024 | ezio.melotti | 2010-03-17 16:22:34 +0200 (Wed, 17 Mar 2010) | 1 line Use "x in y" instead of y.find(x) != -1. ........
Diffstat (limited to 'Lib/test/test_file.py')
-rw-r--r--Lib/test/test_file.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index ed100c14b7..c5e5ea16df 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -220,7 +220,7 @@ class OtherFileTests(unittest.TestCase):
except ValueError, msg:
if msg[0] != 0:
s = str(msg)
- if s.find(TESTFN) != -1 or s.find(bad_mode) == -1:
+ if TESTFN in s or bad_mode not in s:
self.fail("bad error message for invalid mode: %s" % s)
# if msg[0] == 0, we're probably on Windows where there may be
# no obvious way to discover why open() failed.