Author: Amaury Forgeot d'Arc <[email protected]>
Branch: 
Changeset: r60326:a57b37e858ae
Date: 2013-01-21 22:40 +0100
http://bitbucket.org/pypy/pypy/changeset/a57b37e858ae/

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

diff --git a/pypy/module/cpyext/test/conftest.py 
b/pypy/module/cpyext/test/conftest.py
--- a/pypy/module/cpyext/test/conftest.py
+++ b/pypy/module/cpyext/test/conftest.py
@@ -1,6 +1,15 @@
 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
+    # test_datetime.py.
+    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"
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to