[py-svn] py-trunk commit d47e03af77c2: fix a test-import issue occuring when there is a second 'testing' directory in PYTHONPATH or so.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Oct 28 22:01:25 CET 2009


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview/
# User holger krekel <holger at merlinux.eu>
# Date 1256762006 -3600
# Node ID d47e03af77c208ac5957482a8fb06dbcc933ae90
# Parent 8aafd94741a023b19993ab4098efb0991a161a5b
fix a test-import issue occuring when there is a second 'testing' directory in PYTHONPATH or so.

--- a/testing/pytest/dist/test_mypickle.py
+++ b/testing/pytest/dist/test_mypickle.py
@@ -120,6 +120,11 @@ class TestPickleChannelFunctional:
     def setup_class(cls):
         cls.gw = execnet.PopenGateway()
         cls.gw.remote_init_threads(5)
+        # we need the remote test code to import 
+        # the same test module here
+        cls.gw.remote_exec(
+            "import py ; py.path.local(%r).pyimport()" %(__file__)
+        )
 
     def test_popen_send_instance(self):
         channel = self.gw.remote_exec("""



More information about the pytest-commit mailing list