Commits

Amaury Forgeot d'Arc committed 47e8024 Draft

Simplify some tests

Comments (0)

Files changed (1)

pypy/module/imp/test/test_import.py

         pathname = _testfilesource()
         stream = streamio.open_file_as_stream(pathname, "r")
         try:
-            w_ret = importing.parse_source_module(space,
-                                                  pathname,
-                                                  stream.readall())
+            w_ret = importing.parse_source_file_module(
+                space, pathname, stream)
         finally:
             stream.close()
         pycode = space.interpclass_w(w_ret)
         os.chmod(pathname, 0777)
         stream = streamio.open_file_as_stream(pathname, "r")
         try:
-            w_ret = importing.parse_source_module(space,
-                                                  pathname,
-                                                  stream.readall())
+            w_ret = importing.parse_source_file_module(
+                space, pathname, stream)
         finally:
             stream.close()
         pycode = space.interpclass_w(w_ret)