diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-03-18 12:29:13 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-03-18 12:29:13 (GMT) |
commit | 7fb4da76507dd8032964b7ae5e40f43657db2610 (patch) | |
tree | 0840327f8be67abbf294b49bb358f7ed756526e2 /Lib/test/test_fileio.py | |
parent | b24ef1963d737e25882a0e0feb305ece1ecbed29 (diff) | |
download | cpython-7fb4da76507dd8032964b7ae5e40f43657db2610.zip cpython-7fb4da76507dd8032964b7ae5e40f43657db2610.tar.gz cpython-7fb4da76507dd8032964b7ae5e40f43657db2610.tar.bz2 |
Merged revisions 79024 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
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_fileio.py')
-rw-r--r-- | Lib/test/test_fileio.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py index 1493c6f..63bc1d9 100644 --- a/Lib/test/test_fileio.py +++ b/Lib/test/test_fileio.py @@ -318,7 +318,7 @@ class OtherFileTests(unittest.TestCase): except ValueError as msg: if msg.args[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.args[0] == 0, we're probably on Windows where there may be # no obvious way to discover why open() failed. |