File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
+ import platform
2
3
3
4
import pytest
4
5
5
6
6
7
pytest_plugins = 'pytester'
7
8
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
+
8
13
9
14
class UnixFS (object ):
10
15
"""
@@ -163,6 +168,7 @@ def bar(self, arg):
163
168
spy .assert_called_once_with (arg = 10 )
164
169
165
170
171
+ @skip_pypy
166
172
def test_instance_method_by_class_spy (mocker ):
167
173
from pytest_mock import mock_module
168
174
@@ -180,6 +186,7 @@ def bar(self, arg):
180
186
assert spy .call_args_list == calls
181
187
182
188
189
+ @skip_pypy
183
190
def test_class_method_spy (mocker ):
184
191
class Foo (object ):
185
192
@@ -193,6 +200,7 @@ def bar(cls, arg):
193
200
spy .assert_called_once_with (arg = 10 )
194
201
195
202
203
+ @skip_pypy
196
204
def test_class_method_with_metaclass_spy (mocker ):
197
205
class MetaFoo (type ):
198
206
pass
@@ -211,6 +219,7 @@ def bar(cls, arg):
211
219
spy .assert_called_once_with (arg = 10 )
212
220
213
221
222
+ @skip_pypy
214
223
def test_static_method_spy (mocker ):
215
224
class Foo (object ):
216
225
You can’t perform that action at this time.
0 commit comments