diff options
Diffstat (limited to 'Lib/test/test_file.py')
-rw-r--r-- | Lib/test/test_file.py | 2 |
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. |