diff options
| -rw-r--r-- | Lib/test/test_file.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_fileio.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_minidom.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index 5034a5b..6d51fd5 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py @@ -166,7 +166,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. 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. diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index bd20fa1..70f1dbb 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -432,7 +432,7 @@ class MinidomTest(unittest.TestCase): string1 = repr(el) string2 = str(el) self.confirm(string1 == string2) - self.confirm(string1.find("slash:abc") != -1) + self.confirm("slash:abc" in string1) dom.unlink() def testAttributeRepr(self): |
