Commits

Vincent Legoll committed 9d4bb86

Add a test checking that "from .os import sep" correctly raise ImportError

  • Participants
  • Parent commits a665609

Comments (0)

Files changed (1)

pypy/module/imp/test/test_import.py

             import pkg_r.inpkg
         raises(ImportError, imp)
 
+    def test_absolute_import_without_future(self):
+        # If explicit relative import syntax is used, then do not try
+        # to perform an absolute import in the face of failure.
+        # CPython Issue #7902.
+        def imp():
+            from .os import sep
+        raises(ImportError, imp)
+
     def test_import_builtin_inpackage(self):
         def imp():
             import pkg.sys