use os.symlink to make things work on windows/py32

This commit is contained in:
holger krekel 2011-11-07 21:02:07 +00:00
parent 78438db752
commit 369b7709f7
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import py, pytest
import os
from _pytest.tmpdir import pytest_funcarg__tmpdir, TempdirHandler
from _pytest.python import FuncargRequest
@ -69,7 +70,7 @@ def test_basetemp(testdir):
def test_tmpdir_keeps_symlinks(testdir):
realtemp = testdir.tmpdir.mkdir("myrealtemp")
linktemp = testdir.tmpdir.join("symlinktemp")
linktemp.mksymlinkto(realtemp)
os.symlink(str(realtemp), str(linktemp))
p = testdir.makepyfile("""
def test_1(tmpdir):
import os