Closed nidico closed 11 years ago
I'm not having this problem using the same setup on a Debian Squeeze VM.
Can you run bin/test --pdb
, and then at the pdb prompt do
(pdb) !import test
(pdb) p test.__file__
And also show us the contents of the buildout-generated bin/test
script?
Sure:
nico@pesto $ bin/test --pdb
Running zope.testrunner.layer.UnitTests tests:
Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
Error in test /home/nico/src/zope.testbrowser/src/zope/testbrowser/README.txt
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 2284, in debug
runner.run(self._dt_test, clear_globs=False)
File "/usr/lib64/python2.7/doctest.py", line 1774, in run
r = DocTestRunner.run(self, test, compileflags, out, False)
File "/usr/lib64/python2.7/doctest.py", line 1429, in run
return self.__run(test, compileflags, out)
File "/usr/lib64/python2.7/doctest.py", line 1343, in __run
exc_info)
File "/usr/lib64/python2.7/doctest.py", line 1780, in report_unexpected_exception
raise UnexpectedException(test, example, exc_info)
UnexpectedException: <DocTest README.txt from /home/nico/src/zope.testbrowser/src/zope/testbrowser/README.txt:0 (408 examples)>
exceptions.ImportError:
cannot import name pystone
> /home/nico/src/zope.testbrowser/src/zope/testbrowser/browser.py(135)pystonesPerSecond()
-> from test import pystone
(Pdb) !import test
(Pdb) p test.__file__
'/usr/lib64/python2.7/test/__init__.pyc'
(Pdb)
bin/test
:
#!/home/nico/src/zope.testbrowser/bin/python
import sys
sys.path[0:0] = [
'/home/nico/src/zope.testbrowser/src',
'/home/nico/src/zope.testbrowser/eggs/zope.testrunner-4.3.3-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/zope.interface-4.0.5-py2.7-linux-x86_64.egg',
'/home/nico/src/zope.testbrowser/eggs/zope.exceptions-4.0.6-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/six-1.3.0-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/setuptools-0.6c12dev_r88846-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/WebTest-1.3.4-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/zope.testing-4.1.2-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/pytz-2013b-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/zope.schema-4.3.2-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/mechanize-0.2.5-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/WebOb-1.2.3-py2.7.egg',
'/home/nico/src/zope.testbrowser/eggs/zope.event-4.0.2-py2.7.egg',
]
import zope.testrunner
if __name__ == '__main__':
sys.exit(zope.testrunner.run((['--tests-pattern', '^f?tests$']) + [
'--test-path', '/home/nico/src/zope.testbrowser/src',
]))
Ok, this looks like an issue with Fedora's Python packaging (they do not ship the test.pystone module in their main Python package), and nothing to do with zope.testbrowser.
yum install python-test
and the tests should pass.
Confirmed! Thanks for looking into this!
ImportError: cannot import name pystone -> solution is yum install python-test. Thank you, it works~~
I'm facing the same issue:
File "/usr/lib/python2.7/site-packages/dpkt/decorators.py", line 4, in
But, yum install python-test did not resolve the issue. What else can be done?
Building zope.testbrowser on my Fedora 18 machine with python-2.7.3 and virtualenv-1.9.1 from PyPI fails, using the enclosed buildout. This came up in #4 originally. This is the full stack trace: