diff options
| author | Benjamin Peterson <benjamin@python.org> | 2012-01-24 14:06:45 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2012-01-24 14:06:45 (GMT) |
| commit | 8485ad1410f790abbd3bb2c019b4657241586f57 (patch) | |
| tree | 04c8fdbe938b0c746711353ef0960480ce36f2b6 /Lib/test/test_os.py | |
| parent | 3ef2f8c296ec144586fe35babbaf9d644c7ad222 (diff) | |
| parent | 91ecea24f53b99aa190f6b17c2b51d95cb09d233 (diff) | |
| download | cpython-8485ad1410f790abbd3bb2c019b4657241586f57.zip cpython-8485ad1410f790abbd3bb2c019b4657241586f57.tar.gz cpython-8485ad1410f790abbd3bb2c019b4657241586f57.tar.bz2 | |
merge heads
Diffstat (limited to 'Lib/test/test_os.py')
| -rw-r--r-- | Lib/test/test_os.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 79e66fb..e78db48 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -500,7 +500,12 @@ class WalkTests(unittest.TestCase): f.write("I'm " + path + " and proud of it. Blame test_os.\n") f.close() if support.can_symlink(): - os.symlink(os.path.abspath(t2_path), link_path) + if os.name == 'nt': + def symlink_to_dir(src, dest): + os.symlink(src, dest, True) + else: + symlink_to_dir = os.symlink + symlink_to_dir(os.path.abspath(t2_path), link_path) sub2_tree = (sub2_path, ["link"], ["tmp3"]) else: sub2_tree = (sub2_path, [], ["tmp3"]) @@ -1131,7 +1136,7 @@ class Win32SymlinkTests(unittest.TestCase): os.remove(self.missing_link) def test_directory_link(self): - os.symlink(self.dirlink_target, self.dirlink) + os.symlink(self.dirlink_target, self.dirlink, True) self.assertTrue(os.path.exists(self.dirlink)) self.assertTrue(os.path.isdir(self.dirlink)) self.assertTrue(os.path.islink(self.dirlink)) |
