mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
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. ........
This commit is contained in:
parent
e67bbfb6ef
commit
c0fd6ffd4f
7 changed files with 24 additions and 23 deletions
|
@ -189,7 +189,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue