diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-02 18:18:02 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-02 18:18:02 (GMT) |
commit | c041ab6c7d8fb6c32499c7adbe36bb9b48228c2c (patch) | |
tree | b4153592b395129a6c65bed637ff316dbfc1d61c /Lib/test/test_shutil.py | |
parent | 5e458f520ca6ae0f7b73bfc2de310ac0a0139ded (diff) | |
download | cpython-c041ab6c7d8fb6c32499c7adbe36bb9b48228c2c.zip cpython-c041ab6c7d8fb6c32499c7adbe36bb9b48228c2c.tar.gz cpython-c041ab6c7d8fb6c32499c7adbe36bb9b48228c2c.tar.bz2 |
Mock the rename failure a bit better
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r-- | Lib/test/test_shutil.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index a200236..a750166 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -7,6 +7,7 @@ import sys import stat import os import os.path +import errno import functools from test import support from test.support import TESTFN @@ -46,7 +47,7 @@ except ImportError: def _fake_rename(*args, **kwargs): # Pretend the destination path is on a different filesystem. - raise OSError() + raise OSError(getattr(errno, 'EXDEV', 18), "Invalid cross-device link") def mock_rename(func): @functools.wraps(func) |