Comments (7)
I'm not having this problem using the same setup on a Debian Squeeze VM.
from zope.testbrowser.
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?
from zope.testbrowser.
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',
]))
from zope.testbrowser.
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.
from zope.testbrowser.
Confirmed! Thanks for looking into this!
from zope.testbrowser.
ImportError: cannot import name pystone -> solution is yum install python-test.
Thank you, it works~~
from zope.testbrowser.
I'm facing the same issue:
File "/usr/lib/python2.7/site-packages/dpkt/decorators.py", line 4, in
from test import pystone
ImportError: cannot import name pystone
But, yum install python-test did not resolve the issue. What else can be done?
from zope.testbrowser.
Related Issues (20)
- displayValue setter silently ignores values which are not in displayOptions HOT 1
- Sphinx doctests are broken in Python 3 HOT 2
- Fix DeprecationWarnings
- Careless use of CSS selectors breaks with new BeautifulSoup HOT 1
- Tests are broken on master HOT 3
- Cookie tests fail in different locales
- ItemControl.click() lets you uncheck radio buttons
- getLink() used to see iframes, now it doesn't
- Value of unchecked checkboxes changed from False to [] in zope.testbrowser 5.0.0 HOT 2
- getControl('Label') cannot find hidden inputs any more
- .reload() fails if the previous request was a POST HOT 1
- .reload() does not follow redirects nor does it raise exceptions for bad HTTP statuses HOT 1
- getLink() used to consider the whole enclosed text content, now it only looks at the directly contained text
- Allow option to prevent auto redirection HOT 1
- Python 3.8 support HOT 2
- getLink now tests regexes using .match, not .search HOT 1
- getLink uses stale cached HTML after goBack
- Browser._preparedRequest is a bit overenthusiastic about setting Referer HOT 1
- Browser._findAllControls() has wrong behaviour with no-name inputs and checkboxes HOT 1
- Replace `.browser.SetattrErrorsMixin` with `__slots__`?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zope.testbrowser.