[py-svn] commit/pytest: hpk42: skip the symlink test on windows, win32/py32 does not support it without privs

Bitbucket commits-noreply at bitbucket.org
Mon Nov 7 23:00:21 CET 2011


1 new commit in pytest:


https://bitbucket.org/hpk42/pytest/changeset/e29e0af293e6/
changeset:   e29e0af293e6
user:        hpk42
date:        2011-11-07 23:00:12
summary:     skip the symlink test on windows, win32/py32 does not support it without privs
affected #:  1 file

diff -r 85bbda29aa07273d7091ab2c0a7ff9c3be505ae6 -r e29e0af293e6fa3cfe09b5184c8ff8d7e03dc3fe testing/test_tmpdir.py
--- a/testing/test_tmpdir.py
+++ b/testing/test_tmpdir.py
@@ -66,11 +66,11 @@
     assert result.ret == 0
     assert mytemp.join('hello').check()
 
- at pytest.mark.skipif("not hasattr(os, 'symlink')")
+ at pytest.mark.skipif("not hasattr(py.path.local, 'mksymlinkto')")
 def test_tmpdir_keeps_symlinks(testdir):
     realtemp = testdir.tmpdir.mkdir("myrealtemp")
     linktemp = testdir.tmpdir.join("symlinktemp")
-    os.symlink(str(realtemp), str(linktemp))
+    linktemp.mksymlinkto(realtemp)
     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