Permalink
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...
1 parent 7c02877 commit 42012c2c75cf5a1aad44492e2d93e161a140fa23 Aaron Iles committed Jan 7, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/test_inspect.py
View
@@ -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'

0 comments on commit 42012c2

Please sign in to comment.