[pypy-commit] pypy py3.3: Test cleanup.
kvas
noreply at buildbot.pypy.org
Sun Jul 27 14:27:24 CEST 2014
Author: Vasily Kuznetsov <kvas.it at gmail.com>
Branch: py3.3
Changeset: r72569:9d0edadd99a6
Date: 2014-07-27 13:35 +0200
http://bitbucket.org/pypy/pypy/changeset/9d0edadd99a6/
Log: Test cleanup.
diff --git a/pypy/module/__builtin__/test/test_compile.py b/pypy/module/__builtin__/test/test_compile.py
--- a/pypy/module/__builtin__/test/test_compile.py
+++ b/pypy/module/__builtin__/test/test_compile.py
@@ -67,23 +67,23 @@
for to_compile in [code, tree]:
compiled = compile(to_compile, "<test>", "exec", optimize=2)
- # check that the docstrings are really gone
- marshalled = str(marshal.dumps(compiled))
- assert 'module_doc' not in marshalled
- assert 'func_doc' not in marshalled
- assert 'class_doc' not in marshalled
-
- # try to execute the bytecode and see what we get
ns = {}
exec(compiled, ns)
assert '__doc__' not in ns
assert ns['f'].__doc__ is None
assert ns['C'].__doc__ is None
+ # Check that the docstrings are gone from the bytecode and not just
+ # inaccessible.
+ marshalled = str(marshal.dumps(compiled))
+ assert 'module_doc' not in marshalled
+ assert 'func_doc' not in marshalled
+ assert 'class_doc' not in marshalled
+
# TODO: Check the value of __debug__ inside of the compiled block!
# According to the documentation, it should follow the optimize flag.
-# However, cpython3.3 behaves the same way as PyPy (__debug__ follows
+# However, cpython3.5.0a0 behaves the same way as PyPy (__debug__ follows
# -O, -OO flags of the interpreter).
-# TODO: It would also be good to test that with the assert is not removed and
-# is executed when -O flag is set but optimize=0.
+# TODO: It would also be good to test that the assert is not removed and is
+# executed when -O flag is set but optimize=0.
More information about the pypy-commit
mailing list