Skip to content

Commit 2a03740

Browse files
committed
tests: Add test to check issue adafruit#429.
1 parent efccbf6 commit 2a03740

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

tests/basics/globals-del.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
1
3+
"""
4+
5+
def _f(): pass
6+
FunctionType = type(_f)
7+
LambdaType = type(lambda: None)
8+
CodeType = None
9+
MappingProxyType = None
10+
SimpleNamespace = None
11+
12+
def _g():
13+
yield 1
14+
GeneratorType = type(_g())
15+
16+
class _C:
17+
def _m(self): pass
18+
MethodType = type(_C()._m)
19+
20+
BuiltinFunctionType = type(len)
21+
BuiltinMethodType = type([].append)
22+
23+
del _f
24+
25+
# print only the first 8 chars, since we have different str rep to CPython
26+
print(str(FunctionType)[:8])
27+
print(str(BuiltinFunctionType)[:8])

0 commit comments

Comments
 (0)