Interpret another error as missing symlink support on Windows

This occurs if the system and Python support symlinks, but the user does
not have permission to create them.
This commit is contained in:
Thomas Kluyver 2014-09-30 14:09:42 -07:00
parent 780ceee03a
commit 645f542e2b

View File

@ -144,7 +144,10 @@ def test_atomic_writing():
try:
os.symlink(f1, f2)
have_symlink = True
except (AttributeError, NotImplementedError):
except (AttributeError, NotImplementedError, OSError):
# AttributeError: Python doesn't support it
# NotImplementedError: The system doesn't support it
# OSError: The user lacks the privilege (Windows)
have_symlink = False
with nt.assert_raises(CustomExc):