refining the win32 checks some further
--HG-- branch : trunk
This commit is contained in:
parent
10f6c3a432
commit
5715bbd6f5
|
@ -5,7 +5,7 @@ import sys, os, stat, re, atexit
|
|||
import py
|
||||
from py._path import common
|
||||
|
||||
iswin32 = sys.platform == "win32" or (os._name == 'nt')
|
||||
iswin32 = sys.platform == "win32" or (getattr(os, '_name', False) == 'nt')
|
||||
|
||||
class Stat(object):
|
||||
def __getattr__(self, name):
|
||||
|
|
|
@ -4,6 +4,11 @@ from py.path import local
|
|||
from testing.path import common
|
||||
|
||||
failsonjython = py.test.mark.xfail("sys.platform.startswith('java')")
|
||||
win32only = py.test.mark.skipif(
|
||||
"not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')")
|
||||
failsonwin32 = py.test.mark.skipif(
|
||||
"sys.platform == 'win32' or getattr(os, '_name', None) == 'nt'")
|
||||
|
||||
|
||||
def pytest_funcarg__path1(request):
|
||||
def setup():
|
||||
|
@ -193,7 +198,7 @@ class TestLocalPath(common.CommonFSTests):
|
|||
assert l[2] == p3
|
||||
|
||||
class TestExecutionOnWindows:
|
||||
pytestmark = py.test.mark.skipif("not (sys.platform == 'win32' or os._name == 'nt')")
|
||||
pytestmark = win32only
|
||||
|
||||
def test_sysfind(self):
|
||||
x = py.path.local.sysfind('cmd')
|
||||
|
@ -201,7 +206,7 @@ class TestExecutionOnWindows:
|
|||
assert py.path.local.sysfind('jaksdkasldqwe') is None
|
||||
|
||||
class TestExecution:
|
||||
pytestmark = py.test.mark.skipif("sys.platform == 'win32' or os._name == 'nt'")
|
||||
pytestmark = failsonwin32
|
||||
|
||||
def test_sysfind(self):
|
||||
x = py.path.local.sysfind('test')
|
||||
|
@ -357,7 +362,7 @@ def test_samefile(tmpdir):
|
|||
assert p.samefile(p)
|
||||
|
||||
class TestWINLocalPath:
|
||||
pytestmark = py.test.mark.skipif("sys.platform != 'win32' and os._name != 'win32'")
|
||||
pytestmark = win32only
|
||||
|
||||
def test_owner_group_not_implemented(self, path1):
|
||||
py.test.raises(NotImplementedError, "path1.stat().owner")
|
||||
|
@ -406,7 +411,7 @@ class TestWINLocalPath:
|
|||
old.chdir()
|
||||
|
||||
class TestPOSIXLocalPath:
|
||||
pytestmark = py.test.mark.skipif("sys.platform == 'win32' or os._name == 'nt'")
|
||||
pytestmark = failsonwin32
|
||||
|
||||
def test_hardlink(self, tmpdir):
|
||||
linkpath = tmpdir.join('test')
|
||||
|
|
Loading…
Reference in New Issue