Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r59009:1219a8007fe2
Date: 2012-11-19 22:05 +0100
http://bitbucket.org/pypy/pypy/changeset/1219a8007fe2/

Log:    Fix test, now passes with -A (cpython3.2) and without (py.py)

diff --git a/pypy/module/imp/test/test_import.py 
b/pypy/module/imp/test/test_import.py
--- a/pypy/module/imp/test/test_import.py
+++ b/pypy/module/imp/test/test_import.py
@@ -474,6 +474,8 @@
         def check_relative():
             self.exec_("from . import a", ns)
 
+        import pkg
+
         # Check both OK with __package__ and __name__ correct
         ns = dict(__package__='pkg', __name__='pkg.notarealmodule')
         check_absolute()
@@ -494,9 +496,9 @@
         check_absolute() # XXX check warnings
         raises(SystemError, check_relative)
 
-        # Check both fail with package set to a non-string
+        # Check relative fails when __package__ set to a non-string
         ns = dict(__package__=object())
-        raises(ValueError, check_absolute)
+        check_absolute()
         raises(ValueError, check_relative)
 
     def test_universal_newlines(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to