Amaury Forgeot d'Arc  committed 1219a80

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

  • Participants
  • Parent commits 2ed2f6d
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/module/imp/test/

         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() # 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):