Note that there are some explanatory texts on larger screens.

plurals
  1. POImport Error: No module named testrunner
    primarykey
    data
    text
    <p>I followed <a href="http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0/updating-add-on-products-for-plone-4.0/no-longer-bin-instance-test-use-zc.recipe.testrunner" rel="nofollow">this</a> to add <code>zc.recipe.testrunner</code> to my buildout. I can run buildout successfully but when I run <code>bin/test</code>, I get:</p> <pre><code>ImportError: No module named testrunner </code></pre> <p>I have <code>zope.testrunner-4.0.4-py2.4.egg</code> in </p> <pre><code>/usr/local/lib/python2.4/site-packages </code></pre> <p>I also pinned </p> <pre><code>zope.testrunner = 4.0.4 zc.recipe.testruner = 1.4.0 zc.recipe.egg = 1.3.2 </code></pre> <p>When I ran buildout, I used <code>-vvv</code> and I got:</p> <pre><code>... Installing 'zc.recipe.testrunner'. We have the distribution that satisfies 'zc.recipe.testrunner==1.4.0'. Egg from site-packages: z3c.recipe.scripts 1.0.1 Egg from site-packages: zope.testrunner 4.0.4 Egg from site-packages: zope.interface 3.8.0 Egg from site-packages: zope.exceptions 3.7.1 ... We have the distribution that satisfies 'zope.testrunner==4.0.4'. Egg from site-packages: zope.testrunner 4.0.4 Adding required 'zope.interface' required by zope.testrunner 4.0.4. We have a develop egg: zope.interface 0.0 Adding required 'zope.exceptions' required by zope.testrunner 4.0.4. We have a develop egg: zope.exceptions 0.0 ... </code></pre> <p>Why is it I get an ImportError? Is zope.testrunner not installed correctly? </p> <p><strong>Edit:</strong></p> <p><strong>This is the relevant part in my buildout:</strong></p> <pre><code>[buildout] ... parts = ... test [test] recipe = zc.recipe.testrunner defaults = ['--auto-color', '--auto-progress'] eggs = my.product </code></pre> <p><strong>This is the content in <code>bin/test</code>:</strong></p> <pre><code>#!/usr/local/bin/python2.4 -S import sys sys.path[0:0] = [ '/home/jil/mySandbox/myTrunk/parts/test/site-packages', ] import os path = sys.path[0] if os.environ.get('PYTHONPATH'): path = os.pathsep.join([path, os.environ['PYTHONPATH']]) os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ.get('PYTHONPATH', '') os.environ['PYTHONPATH'] = path import site # imports custom buildout-generated site.py import os sys.argv[0] = os.path.abspath(sys.argv[0]) os.chdir('/home/jil/mySandbox/myTrunk/parts/test/working-directory') import zope.testrunner if __name__ == '__main__': zope.testrunner.run((['--auto-color', '--auto-progress']) + [ '--test-path', '/home/jil/mySandbox/myTrunk/src/my.product', ]) </code></pre> <p><strong>This is the error after running <code>bin/test</code>:</strong></p> <pre><code>Traceback (most recent call last): File "/home/jil/mySandbox/myTrunk/bin/test", line 20, in ? import zope.testrunner ImportError: No module named testrunner </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload