[py-svn] commit/pytest: hpk42: use os.symlink to make things work on windows/py32

Bitbucket commits-noreply at bitbucket.org
Mon Nov 7 22:02:18 CET 2011


1 new commit in pytest:


https://bitbucket.org/hpk42/pytest/changeset/85bbda29aa07/
changeset:   85bbda29aa07
user:        hpk42
date:        2011-11-07 22:02:07
summary:     use os.symlink to make things work on windows/py32
affected #:  1 file

diff -r ed2419f694561257b1e59becf63ad241f203ecc6 -r 85bbda29aa07273d7091ab2c0a7ff9c3be505ae6 testing/test_tmpdir.py
--- a/testing/test_tmpdir.py
+++ b/testing/test_tmpdir.py
@@ -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_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

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the pytest-commit mailing list