mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Merge: #12780: update inspect test skipIf for PEP 3147.
This commit is contained in:
commit
b55f944fa9
1 changed files with 5 additions and 4 deletions
|
|
@ -446,10 +446,11 @@ class TestBuggyCases(GetSourceBase):
|
|||
def test_method_in_dynamic_class(self):
|
||||
self.assertSourceEqual(mod2.method_in_dynamic_class, 95, 97)
|
||||
|
||||
@unittest.skipIf(
|
||||
not hasattr(unicodedata, '__file__') or
|
||||
unicodedata.__file__[-4:] in (".pyc", ".pyo"),
|
||||
"unicodedata is not an external binary module")
|
||||
# This should not skip for CPython, but might on a repackaged python where
|
||||
# unicodedata is not an external module, or on pypy.
|
||||
@unittest.skipIf(not hasattr(unicodedata, '__file__') or
|
||||
unicodedata.__file__.endswith('.py'),
|
||||
"unicodedata is not an external binary module")
|
||||
def test_findsource_binary(self):
|
||||
self.assertRaises(OSError, inspect.getsource, unicodedata)
|
||||
self.assertRaises(OSError, inspect.findsource, unicodedata)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue