On Feb 7, 12:09 pm, "Chris Miles" <[EMAIL PROTECTED]> wrote:
> These ones do, however: #1289 and #1290
Tried again with a checkout of 1.0.x branch (r2559) which incorporated
the above fixes.
Two of the controller tests now pass, but one still fails. The failed
response contains a 500 error with the following exception:
----
<pre id="traceback">traceback (most recent call last):
file "/library/frameworks/python.framework/versions/2.4/lib/
python2.4/site-packages/cherrypy-2.2.1-py2.4.egg/cherrypy/
_cphttptools.py", line 103, in _run
applyfilters('before_main')
file "/library/frameworks/python.framework/versions/2.4/lib/
python2.4/site-packages/cherrypy-2.2.1-py2.4.egg/cherrypy/filters/
__init__.py", line 151, in applyfilters
method()
file "/library/frameworks/python.framework/versions/2.4/lib/
python2.4/site-packages/turbogears-1.0.2dev_r2559-py2.4.egg/turbogears/
visit/api.py", line 147, in before_main
visit= _manager.new_visit_with_key( visit_key )
attributeerror: 'nonetype' object has no attribute
'new_visit_with_key'
</pre>
----
The problem now, as I see it, is that as a test completes it calls
teardown_func() to stop TurboGears. i.e.:
----
test_indextitle = with_setup(teardown=teardown_func)(test_indextitle)
----
This clears the visit manager which is not re-initialised for the next
test.
I can make all controller tests pass by removing the
"teardown=teardown_func" option from the with_setup() calls. However,
I don't know if removing the teardown_func has any other negative
effects on tests.
If this fix is acceptable, I can create a ticket containing a patch
for this to apply to the 1.0 branch, if it would help.
Cheers,
CM
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---