Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 42012c2c75cf5a1aad44492e2d93e161a140fa23 1 parent 7c02877
Aaron Iles authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/test_inspect.py
View
4 tests/test_inspect.py
@@ -128,9 +128,13 @@ def test_signature_on_builtin_function(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'
Please sign in to comment.
Something went wrong with that request. Please try again.