mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#1492704: Ensure and document backward compatibility of the change
This commit is contained in:
parent
5887959091
commit
27ddb576f1
2 changed files with 4 additions and 1 deletions
|
@ -1223,6 +1223,8 @@ class TestShutil(unittest.TestCase):
|
|||
src_file = os.path.join(src_dir, 'foo')
|
||||
write_file(src_file, 'foo')
|
||||
self.assertRaises(SameFileError, shutil.copyfile, src_file, src_file)
|
||||
# But Error should work too, to stay backward compatible.
|
||||
self.assertRaises(Error, shutil.copyfile, src_file, src_file)
|
||||
|
||||
def test_copytree_return_value(self):
|
||||
# copytree returns its destination path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue