mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-33261: guard access to __code__ attribute in inspect (GH-6448)
This commit is contained in:
parent
487b73ab39
commit
fcef60f59d
4 changed files with 29 additions and 9 deletions
|
|
@ -146,6 +146,7 @@ class TestPredicates(IsTestBase):
|
|||
self.istest(inspect.isfunction, 'mod.spam')
|
||||
self.istest(inspect.isfunction, 'mod.StupidGit.abuse')
|
||||
self.istest(inspect.ismethod, 'git.argue')
|
||||
self.istest(inspect.ismethod, 'mod.custom_method')
|
||||
self.istest(inspect.ismodule, 'mod')
|
||||
self.istest(inspect.isdatadescriptor, 'collections.defaultdict.default_factory')
|
||||
self.istest(inspect.isgenerator, '(x for x in range(2))')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue