summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-11-15 23:34:44 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-11-15 23:34:44 (GMT)
commit2821644d8add382226b75989a9e89a8c24b2d0dc (patch)
treebc5e0da2d16570b7a77a042fe135c80e2f99c547 /Lib/test/test_os.py
parent19bd0698e53b7c64a2aa858d77164ef8415041bd (diff)
downloadcpython-2821644d8add382226b75989a9e89a8c24b2d0dc.zip
cpython-2821644d8add382226b75989a9e89a8c24b2d0dc.tar.gz
cpython-2821644d8add382226b75989a9e89a8c24b2d0dc.tar.bz2
Issue #13374: Skip deprecation tests for os.symlink() on Windows XP
To avoid a NotImplementedError('CreateSymbolicLinkW not found') error.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index ec2877e..a3b99a3 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -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():