mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Merge 3.4
This commit is contained in:
commit
d577cea8ab
7 changed files with 20 additions and 12 deletions
|
@ -1124,18 +1124,19 @@ class PosixTester(unittest.TestCase):
|
|||
"""
|
||||
Test functions that call path_error2(), providing two filenames in their exceptions.
|
||||
"""
|
||||
for name in ("rename", "replace", "link", "symlink"):
|
||||
for name in ("rename", "replace", "link"):
|
||||
function = getattr(os, name, None)
|
||||
if function is None:
|
||||
continue
|
||||
|
||||
if function:
|
||||
for dst in ("noodly2", support.TESTFN):
|
||||
try:
|
||||
function('doesnotexistfilename', dst)
|
||||
except OSError as e:
|
||||
self.assertIn("'doesnotexistfilename' -> '{}'".format(dst), str(e))
|
||||
break
|
||||
else:
|
||||
self.fail("No valid path_error2() test for os." + name)
|
||||
for dst in ("noodly2", support.TESTFN):
|
||||
try:
|
||||
function('doesnotexistfilename', dst)
|
||||
except OSError as e:
|
||||
self.assertIn("'doesnotexistfilename' -> '{}'".format(dst), str(e))
|
||||
break
|
||||
else:
|
||||
self.fail("No valid path_error2() test for os." + name)
|
||||
|
||||
class PosixGroupsTester(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue