#4 — can't run tests
by
Maik Derstappen
—
last modified
Jan 09, 2012 10:49 PM
| State | Unconfirmed |
|---|---|
| Version: |
—
|
| Area | Functionality |
| Issue type | Bug |
| Severity | Medium |
| Submitted by | Maik Derstappen |
| Submitted on | Feb 01, 2011 |
| Responsible |
—
|
| Target release: |
—
|
if i try to run the tests, i got the following error in my plone3.3.5 buildout.
Failure in test /home/maik/development/community/Products.PloneboardNotify/Products/PloneboardNotify/README.txt
Failed doctest test for README.txt
File "/home/maik/development/community/Products.PloneboardNotify/Products/PloneboardNotify/README.txt", line 0
----------------------------------------------------------------------
File "/home/maik/development/community/Products.PloneboardNotify/Products/PloneboardNotify/README.txt", line 24, in README.txt
Failed example:
browser.open(portal_url+'/login_form')
Exception raised:
Traceback (most recent call last):
File "/home/patrick/dev/venv2.4/zope/tmp/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py", line 1356, in __run
File "<doctest README.txt[6]>", line 1, in ?
browser.open(portal_url+'/login_form')
File "/home/maik/development/tmp/parts/zope2/lib/python/zope/testbrowser/browser.py", line 224, in open
self.mech_browser.open(url, data)
File "/home/maik/development/tmp/parts/zope2/lib/python/mechanize/_mechanize.py", line 177, in open
return self._mech_open(url, data)
File "/home/maik/development/tmp/parts/zope2/lib/python/mechanize/_mechanize.py", line 202, in _mech_open
response = UserAgent.open(self, self.request, data)
File "/home/maik/development/tmp/parts/zope2/lib/python/mechanize/_opener.py", line 234, in open
response = urlopen(self, req, data)
File "/usr/lib/python2.4/urllib2.py", line 376, in _open
'_open', req)
File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/home/maik/development/tmp/parts/zope2/lib/python/Products/Five/testbrowser.py", line 64, in http_open
return self.do_open(PublisherConnection, req)
File "/usr/lib/python2.4/urllib2.py", line 993, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/home/maik/development/tmp/parts/zope2/lib/python/zope/testbrowser/testing.py", line 80, in request
self.response = self.caller(request_string, handle_errors)
File "/home/maik/development/tmp/parts/zope2/lib/python/Testing/ZopeTestCase/functional.py", line 38, in wrapped_func
return func(*args, **kw)
File "/home/maik/development/tmp/parts/zope2/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py", line 124, in http
from ZPublisher.Test import publish_module
File "/home/maik/development/tmp/parts/zope2/lib/python/ZPublisher/Test.py", line 99, in ?
import sys, traceback, profile, os, getopt
ImportError: No module named profile
Ran 28 tests with 1 failures and 0 errors in 0.620 seconds.
Tearing down left over layers:
Tear down Products.PloneTestCase.layer.PloneSite in 0.524 seconds.
Tear down Products.PloneTestCase.layer.ZCML in 0.006 seconds.
Tests with failures:
/home/maik/development/community/Products.PloneboardNotify/Products/PloneboardNotify/README.txt
Failure in test /home/maik/development/community/Products.PloneboardNotify/Products/PloneboardNotify/README.txt
Failed doctest test for README.txt
File "/home/maik/development/community/Products.PloneboardNotify/Products/PloneboardNotify/README.txt", line 0
----------------------------------------------------------------------
File "/home/maik/development/community/Products.PloneboardNotify/Products/PloneboardNotify/README.txt", line 24, in README.txt
Failed example:
browser.open(portal_url+'/login_form')
Exception raised:
Traceback (most recent call last):
File "/home/patrick/dev/venv2.4/zope/tmp/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py", line 1356, in __run
File "<doctest README.txt[6]>", line 1, in ?
browser.open(portal_url+'/login_form')
File "/home/maik/development/tmp/parts/zope2/lib/python/zope/testbrowser/browser.py", line 224, in open
self.mech_browser.open(url, data)
File "/home/maik/development/tmp/parts/zope2/lib/python/mechanize/_mechanize.py", line 177, in open
return self._mech_open(url, data)
File "/home/maik/development/tmp/parts/zope2/lib/python/mechanize/_mechanize.py", line 202, in _mech_open
response = UserAgent.open(self, self.request, data)
File "/home/maik/development/tmp/parts/zope2/lib/python/mechanize/_opener.py", line 234, in open
response = urlopen(self, req, data)
File "/usr/lib/python2.4/urllib2.py", line 376, in _open
'_open', req)
File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/home/maik/development/tmp/parts/zope2/lib/python/Products/Five/testbrowser.py", line 64, in http_open
return self.do_open(PublisherConnection, req)
File "/usr/lib/python2.4/urllib2.py", line 993, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/home/maik/development/tmp/parts/zope2/lib/python/zope/testbrowser/testing.py", line 80, in request
self.response = self.caller(request_string, handle_errors)
File "/home/maik/development/tmp/parts/zope2/lib/python/Testing/ZopeTestCase/functional.py", line 38, in wrapped_func
return func(*args, **kw)
File "/home/maik/development/tmp/parts/zope2/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py", line 124, in http
from ZPublisher.Test import publish_module
File "/home/maik/development/tmp/parts/zope2/lib/python/ZPublisher/Test.py", line 99, in ?
import sys, traceback, profile, os, getopt
ImportError: No module named profile
Ran 28 tests with 1 failures and 0 errors in 0.620 seconds.
Tearing down left over layers:
Tear down Products.PloneTestCase.layer.PloneSite in 0.524 seconds.
Tear down Products.PloneTestCase.layer.ZCML in 0.006 seconds.
Tests with failures:
/home/maik/development/community/Products.PloneboardNotify/Products/PloneboardNotify/README.txt
Added by
Toni Mueller
on
Nov 22, 2011 09:23 PM
Same problem with 4.0.9:<pre>
----------------------------------------------------------------------
File "/srv/jenkins/jobs/gasandoil.article-4.0/workspace/gasandoil/article/README.txt", line 22, in README.txt
Failed example:
browser.open(portal_url + '/login')
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.6/doctest.py", line 1253, in __run
compileflags, 1) in test.globs
File "<doctest README.txt[7]>", line 1, in <module>
browser.open(portal_url + '/login')
File "/srv/zope/eggs.40/zope.testbrowser-3.6.0a2-py2.6.egg/zope/testbrowser/browser.py", line 239, in open
self.mech_browser.open(url, data)
File "/srv/zope/eggs.40/mechanize-0.1.11-py2.6.egg/mechanize/_mechanize.py", line 209, in open
return self._mech_open(url, data, timeout=timeout)
File "/srv/zope/eggs.40/mechanize-0.1.11-py2.6.egg/mechanize/_mechanize.py", line 236, in _mech_open
response = UserAgentBase.open(self, request, data)
File "/srv/zope/eggs.40/mechanize-0.1.11-py2.6.egg/mechanize/_opener.py", line 191, in open
response = urlopen(self, req, data)
File "/usr/lib/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/srv/zope/eggs.40/Zope2-2.12.19-py2.6-linux-x86_64.egg/Products/Five/testbrowser.py", line 85, in http_open
return self.do_open(PublisherConnection, req)
File "/usr/lib/python2.6/urllib2.py", line 1142, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/srv/zope/eggs.40/zope.testbrowser-3.6.0a2-py2.6.egg/zope/testbrowser/testing.py", line 82, in request
self.response = self.caller(request_string, handle_errors)
File "/srv/zope/eggs.40/Zope2-2.12.19-py2.6-linux-x86_64.egg/Testing/ZopeTestCase/functional.py", line 40, in wrapped_func
return func(*args, **kw)
File "/srv/zope/eggs.40/Zope2-2.12.19-py2.6-linux-x86_64.egg/Testing/ZopeTestCase/zopedoctest/functional.py", line 130, in http
from ZPublisher.Test import publish_module
File "/srv/zope/eggs.40/Zope2-2.12.19-py2.6-linux-x86_64.egg/ZPublisher/Test.py", line 99, in <module>
import sys, traceback, profile, os, getopt
ImportError: No module named profile
File "/usr/lib/python2.6/unittest.py", line 279, in run
testMethod()
File "/usr/lib/python2.6/doctest.py", line 2163, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
Added by
Toni Mueller
on
Jan 09, 2012 10:49 PM
After having been able to reproduce the problem with Plone 4.1.3, I found that the module 'profile.py', part of the Python profiler, is not always being installed, due to licensing problems. In Debian, you have to allow packages from non-free to be able to 'apt-get install python-profiler'.No responses can be added.
If you can, please log in before submitting a reaction.
