mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #13374: Skip deprecation tests for os.symlink() on Windows XP
To avoid a NotImplementedError('CreateSymbolicLinkW not found') error.
This commit is contained in:
parent
19bd0698e5
commit
2821644d8a
1 changed files with 8 additions and 1 deletions
|
@ -1647,12 +1647,19 @@ class Win32DeprecatedBytesAPI(unittest.TestCase):
|
|||
(os.rmdir, filename),
|
||||
(os.startfile, filename),
|
||||
(os.stat, filename),
|
||||
(os.symlink, filename, filename),
|
||||
(os.unlink, filename),
|
||||
(os.utime, filename),
|
||||
):
|
||||
self.assertRaises(DeprecationWarning, func, *args)
|
||||
|
||||
@support.skip_unless_symlink
|
||||
def test_symlink(self):
|
||||
filename = os.fsencode(support.TESTFN)
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("error", DeprecationWarning)
|
||||
self.assertRaises(DeprecationWarning,
|
||||
os.symlink, filename, filename)
|
||||
|
||||
|
||||
@support.reap_threads
|
||||
def test_main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue