Amaury Forgeot d'Arc committed a57b37e

Finally found a workaround for test_datetime failures on linux64.
I suspect a ll2ctypes caching issue.

  • Participants
  • Parent commits c6b47aa

Comments (0)

Files changed (1)


 import py
 import pytest
+def pytest_configure(config):
+    from pypy.tool.pytest.objspace import gettestobjspace
+    # For some reason (probably a ll2ctypes cache issue on linux64)
+    # it's necessary to run "import time" at least once before any
+    # other cpyext test, otherwise the same statement will fail in
+    #
+    space = gettestobjspace(usemodules=['rctime'])
+    space.getbuiltinmodule("time")
 def pytest_ignore_collect(path, config):
     if config.option.runappdirect:
         return True # "cannot be run by py.test -A"