diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 4f2d5ea60a3..48e8bf7d635 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -142,6 +142,7 @@ def test_others(self): cm('urllib', ignore=('getproxies_registry', 'open_https', 'getproxies_internetconfig',)) # not on all platforms + cm('pickle') cm('aifc', ignore=('openfp',)) # set with = in module cm('Cookie') cm('sre_parse', ignore=('dump',)) # from sre_constants import * diff --git a/Lib/types.py b/Lib/types.py index 0d2905d8153..39812ac3228 100644 --- a/Lib/types.py +++ b/Lib/types.py @@ -48,10 +48,9 @@ def _f(): pass # Execution in restricted environment pass -def g(): +def _g(): yield 1 -GeneratorType = type(g()) -del g +GeneratorType = type(_g()) class _C: def _m(self): pass @@ -87,4 +86,4 @@ def _m(self): pass DictProxyType = type(TypeType.__dict__) NotImplementedType = type(NotImplemented) -del sys, _f, _C, _x # Not for export +del sys, _f, _g, _C, _x # Not for export