Hi Michael,

On 26 November 2010 08:37, Michael Howitz <m...@gocept.com> wrote:
> Hi,
>
> currently the ZTK tests on the trunk do not run successfully in a virtualenv.
>
> The errors look like:
>
> atom:trunk mac$ bin/test-ztk
> Running test-ztk-zope.securitypolicy
> test-ztk-zope.securitypolicy failed with:
> Traceback (most recent call last):
>  File 
> "/Users/mac/Documents/tmp/zopetoolkit/trunk/bin/test-ztk-zope.securitypolicy",
>  line 35, in <module>
>    import zope.testrunner
>  File 
> "/Users/mac/Documents/eggs/zope.securitypolicy-3.7.0-py2.5.egg/zope/__init__.py",
>  line 1, in <module>
>    __import__('pkg_resources').declare_namespace(__name__)
>  File 
> "/Users/mac/Documents/eggs/distribute-0.6.14-py2.5.egg/pkg_resources.py", 
> line 17, in <module>
>    from urlparse import urlparse, urlunparse
> ImportError: No module named urlparse
> ...
>
> When I revert the following change, only the test for zope.testing fails (and 
> all zope.app-tests pass):
>
> Am 06.10.2010 um 08:40 schrieb Jan-Jaap Driessen:
>> Log message for revision 117268:
>>  Don't import site on initialization, as this mitigates the buildout 1.5 way 
>> of setting sys.path
>>
>> Changed:
>>  U   z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/runner.py
>>
>> -=-
>> Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/runner.py
>> ===================================================================
>> --- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/runner.py   
>> 2010-10-06 06:30:44 UTC (rev 117267)
>> +++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/runner.py   
>> 2010-10-06 06:40:43 UTC (rev 117268)
>> @@ -31,7 +31,7 @@
>>     def start(self):
>>         self.start = time.time()
>>         self.process = subprocess.Popen(
>> -            [sys.executable, self.script, '--exit-with-status'] + self.args,
>> +            [sys.executable, '-S', self.script, '--exit-with-status'] + 
>> self.args,
>>             stdin=subprocess.PIPE,
>>             stdout=subprocess.PIPE,
>>             stderr=subprocess.STDOUT,
>
> But reverting this change does not help to get the tests of 
> z3c.recipe.compattest itself running again. There are the same errors like 
> before.
>
> Is it intensional that ZTK tests fail in virtualenv?
> What needs be done to get the tests running again in virtualenv?

It took a while for me to react to your email, my apologies. I
remember now that I added the '-S' to z3c.recipe.compattest in order
to make compattest run on windows machines. It was not my intention to
break running from inside a virtualenv. I'll look into the issue some
more this week.


Kind regards,

-- 
Jan-Jaap Driessen
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to