Skip to content

Commit 65d241a

Browse files
committed
xfail some tests on windows on pypy (pytest-dev#63)
1 parent 4de253a commit 65d241a

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

testing/test_basics.py

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
from io import BytesIO
1616

1717

18+
skip_win_pypy = pytest.mark.xfail(condition=hasattr(sys, 'pypy_version_info') and sys.platform.startswith('win'),
19+
reason='failing on Windows on PyPy (#63)')
20+
21+
1822
class TestSerializeAPI:
1923
pytestmark = [
2024
pytest.mark.parametrize("val", [
@@ -369,6 +373,7 @@ def f(channel):
369373
assert self.check(f) == []
370374

371375

376+
@skip_win_pypy
372377
def test_remote_exec_function_with_kwargs(anypython, makegateway):
373378
def func(channel, data):
374379
channel.send(data)
@@ -386,6 +391,7 @@ def test_remote_exc__no_kwargs(makegateway):
386391
pytest.raises(TypeError, gw.remote_exec, 'pass', kwarg=1)
387392

388393

394+
@skip_win_pypy
389395
def test_remote_exec_inspect_stack(makegateway):
390396
gw = makegateway()
391397
ch = gw.remote_exec("""

testing/test_gateway.py

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
needs_osdup = py.test.mark.skipif("not hasattr(os, 'dup')")
1414

1515

16+
skip_win_pypy = pytest.mark.xfail(condition=hasattr(sys, 'pypy_version_info') and sys.platform.startswith('win'),
17+
reason='failing on Windows on PyPy (#63)')
18+
19+
1620
def fails(*args, **kwargs):
1721
0/0
1822

@@ -384,6 +388,7 @@ def test_popen_filetracing(self, testdir, monkeypatch, makegateway):
384388
py.test.fail("did not find %r in tracefile" % (slave_line,))
385389
gw.exit()
386390

391+
@skip_win_pypy
387392
def test_popen_stderr_tracing(self, capfd, monkeypatch, makegateway):
388393
monkeypatch.setenv('EXECNET_DEBUG', "2")
389394
gw = makegateway("popen")

testing/test_termination.py

+5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
import apipkg
44
import subprocess
55
import py
6+
import sys
67
from test_gateway import TESTTIMEOUT
78
execnetdir = py.path.local(execnet.__file__).dirpath().dirpath()
89

10+
skip_win_pypy = pytest.mark.xfail(condition=hasattr(sys, 'pypy_version_info') and sys.platform.startswith('win'),
11+
reason='failing on Windows on PyPy (#63)')
12+
913

1014
def test_exit_blocked_slave_execution_gateway(anypython, makegateway, pool):
1115
gateway = makegateway('popen//python=%s' % anypython)
@@ -42,6 +46,7 @@ def test_endmarker_delivery_on_remote_killterm(makegateway, execmodel):
4246
assert isinstance(err, EOFError)
4347

4448

49+
@skip_win_pypy
4550
def test_termination_on_remote_channel_receive(monkeypatch, makegateway):
4651
if not py.path.local.sysfind('ps'):
4752
py.test.skip("need 'ps' command to externally check process status")

testing/test_xspec.py

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
XSpec = execnet.XSpec
1010

1111

12+
skip_win_pypy = pytest.mark.xfail(condition=hasattr(sys, 'pypy_version_info') and sys.platform.startswith('win'),
13+
reason='failing on Windows on PyPy (#63)')
14+
15+
1216
class TestXSpec:
1317
def test_norm_attributes(self):
1418
spec = XSpec("socket=192.168.102.2:8888//python=c:/this/python2.5"
@@ -109,6 +113,7 @@ class TestMakegateway:
109113
def test_no_type(self, makegateway):
110114
pytest.raises(ValueError, lambda: makegateway('hello'))
111115

116+
@skip_win_pypy
112117
def test_popen_default(self, makegateway):
113118
gw = makegateway("")
114119
assert gw.spec.popen
@@ -144,6 +149,7 @@ def test_popen_env(self, makegateway):
144149
value = ch.receive()
145150
assert value == "123"
146151

152+
@skip_win_pypy
147153
def test_popen_explicit(self, makegateway):
148154
gw = makegateway("popen//python=%s" % sys.executable)
149155
assert gw.spec.python == sys.executable
@@ -180,11 +186,13 @@ def test_popen_cpython26(self, makegateway):
180186
assert rinfo.cwd == os.getcwd()
181187
assert rinfo.version_info[:2] == (2, 6)
182188

189+
@skip_win_pypy
183190
def test_popen_chdir_absolute(self, testdir, makegateway):
184191
gw = makegateway("popen//chdir=%s" % testdir.tmpdir)
185192
rinfo = gw._rinfo()
186193
assert rinfo.cwd == str(testdir.tmpdir.realpath())
187194

195+
@skip_win_pypy
188196
def test_popen_chdir_newsub(self, testdir, makegateway):
189197
testdir.chdir()
190198
gw = makegateway("popen//chdir=hello")

0 commit comments

Comments
 (0)