summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Iles <aaron.iles@gmail.com>2013-01-07 21:44:09 +1100
committerAaron Iles <aaron.iles@gmail.com>2013-01-07 21:44:09 +1100
commit42012c2c75cf5a1aad44492e2d93e161a140fa23 (patch)
tree3de46d52c10323a5bd9ee7c648f570bdfcc40854
parent7c028773209651a50c77e6d36a935bcf3ee837b7 (diff)
downloadfuncsigs-42012c2c75cf5a1aad44492e2d93e161a140fa23.tar.gz
Skip tests for __call__ method of builtins on PyPy
Differences between PyPy and CPython means that these tests will fail on PyPy as they wont raise exceptions. Explicitly raising exceptions on PyPy ensures they will pass.
-rw-r--r--tests/test_inspect.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_inspect.py b/tests/test_inspect.py
index a15ca5f..323c323 100644
--- a/tests/test_inspect.py
+++ b/tests/test_inspect.py
@@ -128,9 +128,13 @@ def test_signature_on_complex_args(self):
with self.assertRaisesRegex(ValueError, 'not supported by signature'):
# support for 'wrapper_descriptor'
inspect.signature(type.__call__)
+ if hasattr(sys, 'pypy_version_info'):
+ raise ValueError('not supported by signature')
with self.assertRaisesRegex(ValueError, 'not supported by signature'):
# support for 'method-wrapper'
inspect.signature(min.__call__)
+ if hasattr(sys, 'pypy_version_info'):
+ raise ValueError('not supported by signature')
with self.assertRaisesRegex(ValueError,
'no signature found for builtin function'):
# support for 'method-wrapper'