diff options
author | Hynek Schlawack <hs@ox.cx> | 2012-10-28 12:59:27 (GMT) |
---|---|---|
committer | Hynek Schlawack <hs@ox.cx> | 2012-10-28 12:59:27 (GMT) |
commit | 27ddb576f163f732a89111e3e66c2d8d5e43e9e8 (patch) | |
tree | c32898476fd1230c34dd2d0404fc9858154dc708 /Lib/test/test_shutil.py | |
parent | 5887959091081bf0ec19b84c5360e3cf97b7111f (diff) | |
download | cpython-27ddb576f163f732a89111e3e66c2d8d5e43e9e8.zip cpython-27ddb576f163f732a89111e3e66c2d8d5e43e9e8.tar.gz cpython-27ddb576f163f732a89111e3e66c2d8d5e43e9e8.tar.bz2 |
#1492704: Ensure and document backward compatibility of the change
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r-- | Lib/test/test_shutil.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index cbca767..c3997dc 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -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. |