Skip to content

Commit 69da39c

Browse files
committed
Skip some of the tests on PyPy
1 parent d796deb commit 69da39c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test_pytest_mock.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import os
2+
import platform
23

34
import pytest
45

56

67
pytest_plugins = 'pytester'
78

9+
# could not make some of the tests work on PyPy, patches are welcome!
10+
skip_pypy = pytest.mark.skipif(platform.python_implementation() == 'PyPy',
11+
reason='could not make work on pypy')
12+
813

914
class UnixFS(object):
1015
"""
@@ -163,6 +168,7 @@ def bar(self, arg):
163168
spy.assert_called_once_with(arg=10)
164169

165170

171+
@skip_pypy
166172
def test_instance_method_by_class_spy(mocker):
167173
from pytest_mock import mock_module
168174

@@ -180,6 +186,7 @@ def bar(self, arg):
180186
assert spy.call_args_list == calls
181187

182188

189+
@skip_pypy
183190
def test_class_method_spy(mocker):
184191
class Foo(object):
185192

@@ -193,6 +200,7 @@ def bar(cls, arg):
193200
spy.assert_called_once_with(arg=10)
194201

195202

203+
@skip_pypy
196204
def test_class_method_with_metaclass_spy(mocker):
197205
class MetaFoo(type):
198206
pass
@@ -211,6 +219,7 @@ def bar(cls, arg):
211219
spy.assert_called_once_with(arg=10)
212220

213221

222+
@skip_pypy
214223
def test_static_method_spy(mocker):
215224
class Foo(object):
216225

0 commit comments

Comments
 (0)