diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-05 18:17:51 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-05 18:17:51 +0100 |
commit | 2a037408af77d4c9e9cc98f5f12ea77fab93cc0e (patch) | |
tree | e2bc540db6f5641ee301b25ba92aa593c6ff9a35 | |
parent | efccbf6f276b8fdf7caccebd0817558b87db5038 (diff) | |
download | micropython-2a037408af77d4c9e9cc98f5f12ea77fab93cc0e.tar.gz micropython-2a037408af77d4c9e9cc98f5f12ea77fab93cc0e.zip |
tests: Add test to check issue #429.
-rw-r--r-- | tests/basics/globals-del.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/basics/globals-del.py b/tests/basics/globals-del.py new file mode 100644 index 0000000000..a1638ac270 --- /dev/null +++ b/tests/basics/globals-del.py @@ -0,0 +1,27 @@ +""" +1 +""" + +def _f(): pass +FunctionType = type(_f) +LambdaType = type(lambda: None) +CodeType = None +MappingProxyType = None +SimpleNamespace = None + +def _g(): + yield 1 +GeneratorType = type(_g()) + +class _C: + def _m(self): pass +MethodType = type(_C()._m) + +BuiltinFunctionType = type(len) +BuiltinMethodType = type([].append) + +del _f + +# print only the first 8 chars, since we have different str rep to CPython +print(str(FunctionType)[:8]) +print(str(BuiltinFunctionType)[:8]) |