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.
........
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index ed100c1..c5e5ea1 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -220,7 +220,7 @@
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.
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index 0eea86b..d1b3751 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -189,7 +189,7 @@
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 16977a5..120c37c 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -439,7 +439,7 @@
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):