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.
This commit is contained in:
parent
7c02877320
commit
42012c2c75
@ -128,9 +128,13 @@ def test_signature_on_complex_args(self):
|
|||||||
with self.assertRaisesRegex(ValueError, 'not supported by signature'):
|
with self.assertRaisesRegex(ValueError, 'not supported by signature'):
|
||||||
# support for 'wrapper_descriptor'
|
# support for 'wrapper_descriptor'
|
||||||
inspect.signature(type.__call__)
|
inspect.signature(type.__call__)
|
||||||
|
if hasattr(sys, 'pypy_version_info'):
|
||||||
|
raise ValueError('not supported by signature')
|
||||||
with self.assertRaisesRegex(ValueError, 'not supported by signature'):
|
with self.assertRaisesRegex(ValueError, 'not supported by signature'):
|
||||||
# support for 'method-wrapper'
|
# support for 'method-wrapper'
|
||||||
inspect.signature(min.__call__)
|
inspect.signature(min.__call__)
|
||||||
|
if hasattr(sys, 'pypy_version_info'):
|
||||||
|
raise ValueError('not supported by signature')
|
||||||
with self.assertRaisesRegex(ValueError,
|
with self.assertRaisesRegex(ValueError,
|
||||||
'no signature found for builtin function'):
|
'no signature found for builtin function'):
|
||||||
# support for 'method-wrapper'
|
# support for 'method-wrapper'
|
||||||
|
Loading…
Reference in New Issue
Block a user