[pypy-commit] pypy py3k: py3k compatibility. Note that we also change the check done by one assert: the corresponding test in lib-python also changed this way
antocuni
noreply at buildbot.pypy.org
Tue Feb 28 12:21:09 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52963:ec3859bf4f3e
Date: 2012-02-28 11:24 +0100
http://bitbucket.org/pypy/pypy/changeset/ec3859bf4f3e/
Log: py3k compatibility. Note that we also change the check done by one
assert: the corresponding test in lib-python also changed this way
diff --git a/pypy/module/imp/test/test_app.py b/pypy/module/imp/test/test_app.py
--- a/pypy/module/imp/test/test_app.py
+++ b/pypy/module/imp/test/test_app.py
@@ -148,14 +148,14 @@
from sys import modules, path
from shutil import rmtree
from tempfile import mkdtemp
- code = """if 1:
+ code = b"""if 1:
import sys
code_filename = sys._getframe().f_code.co_filename
module_filename = __file__
constant = 1
def func():
pass
- func_filename = func.func_code.co_filename
+ func_filename = func.__code__.co_filename
"""
module_name = "unlikely_module_name"
@@ -181,7 +181,7 @@
try:
# Ensure proper results
assert mod != orig_module
- assert mod.module_filename == compiled_name
+ assert mod.module_filename == file_name
assert mod.code_filename == file_name
assert mod.func_filename == file_name
finally:
More information about the pypy-commit
mailing list