1. Pypy
  2. Untitled project
  3. pypy

Commits

Philip Jenvey  committed 5d354f4

backout b1ab47f92c6e
matching cpython 3.2 isn't important here because importlib as import behaves
like this anyway

  • Participants
  • Parent commits 16d9361
  • Branches py3k

Comments (0)

Files changed (2)

File pypy/module/imp/importing.py

View file
  • Ignore whitespace
     else:
         # ImportError
         msg = "No module named %s"
-        raise operationerrfmt(space.w_ImportError, msg, partname)
+        raise operationerrfmt(space.w_ImportError, msg, modulename)
 
 @jit.dont_look_inside
 def reload(space, w_module):

File pypy/module/imp/test/test_import.py

View file
  • Ignore whitespace
         def imp():
             from pkg import relative_f
         exc = raises(ImportError, imp)
-        assert exc.value.args[0] == "No module named imp"
+        assert exc.value.args[0] == "No module named pkg.imp"
 
     def test_no_relative_import_bug(self):
         def imp():
             from pkg import relative_g
         exc = raises(ImportError, imp)
-        assert exc.value.args[0] == "No module named imp"
+        assert exc.value.args[0] == "No module named pkg.imp"
 
     def test_future_relative_import_level_1(self):
         from pkg import relative_c