Discussion:
tg 2.1+ and nosetests
Michael Pedersen
14 years ago
Permalink
So, it's taken some doing (thanks to the difficulties imposed by lxml, which
I'm now wanting to find a way to get rid of), but I now have the nosetests
working almost entirely. I've got one failure, and have to hit the sack
before I can figure out the fix.

Pasting the output below. Any chance anybody knows/recognizes this failure,
and can tell me an easy fix for it?
--------------------------------------------------------------------------------------------------------------------------------------------
(tg21test)[***@mpdev tg2 (development *%)]> python setup.py nosetests
running nosetests
running egg_info
writing requirements to TurboGears2.egg-info/requires.txt
writing TurboGears2.egg-info/PKG-INFO
writing top-level names to TurboGears2.egg-info/top_level.txt
writing dependency_links to TurboGears2.egg-info/dependency_links.txt
writing entry points to TurboGears2.egg-info/entry_points.txt
reading manifest file 'TurboGears2.egg-info/SOURCES.txt'
writing manifest file 'TurboGears2.egg-info/SOURCES.txt'
running build_ext
.F./home/marvin/venvs/tg21test/lib/python2.6/site-packages/Beaker-1.5.2-py2.6.egg/beaker/cache.py:228:
DeprecationWarning: Specifying a 'type' and other namespace configuration
with cache.get()/put()/etc. is deprecated. Specify 'type' and other
namespace configuration to cache_manager.get_cache() and/or the Cache
constructor instead.
return self._legacy_get_value(key, **kw)
.........................................................................................................................................................................................................................................................................................
======================================================================
FAIL: test_304 (tests.test_caching.TestEtagCaching)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/marvin/src/tg2/tests/test_caching.py", line 164, in test_304
assert "304" in resp.status, resp
AssertionError: Response: 200 OK
Cache-Control: no-cache
Content-Type: text/html; charset=utf-8
Etag: "foo"
Pragma: no-cache
bar
-------------------- >> begin captured logging << --------------------
pylons.controllers.util: DEBUG: ETag didn't match, returning response object
pylons.controllers.util: DEBUG: ETag didn't match, returning response object
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 284 tests in 2.118s

FAILED (failures=1)
(tg21test)[***@mpdev tg2 (development *%)]>
--------------------------------------------------------------------------------------------------------------------------------------------
--
Michael J. Pedersen
My IM IDs: Jabber/***@icelus.tzo.com, ICQ/103345809, AIM/pedermj022171
Yahoo/pedermj2002, MSN/***@hotmail.com
--
You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group.
To post to this group, send email to turbogears-***@googlegroups.com.
To unsubscribe from this group, send email to turbogears-trunk+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en.
Michael Pedersen
14 years ago
Permalink
Just to let everybody know: I tracked down this problem.

As it turns out, Pylons 1.0 is more strict about the format of the incoming
"if-none-match" header. The etag being passed in *must* have the "" around
it. As a result, the plain string (foo) was no longer a working etag. Making
it ("foo") allowed it to work.

I've committed this change, and pushed it up to git

Now that my test cases are finally passing cleanly, I can get to work on
migrating tickets and applying patches as appropriate.

Sorry it's taken so long, guys. Really didn't want to have a bogus set of
fixes coming in.
...
--
Michael J. Pedersen
My IM IDs: Jabber/***@icelus.tzo.com, ICQ/103345809, AIM/pedermj022171
Yahoo/pedermj2002, MSN/***@hotmail.com
--
You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group.
To post to this group, send email to turbogears-***@googlegroups.com.
To unsubscribe from this group, send email to turbogears-trunk+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en.
Christoph Zwerschke
14 years ago
Permalink
Post by Michael Pedersen
Now that my test cases are finally passing cleanly, I can get to work on
migrating tickets and applying patches as appropriate.
Thanks, Michael. It's important to keep our test suite clean. We should
install Hudson/Jenkins on Florent's server once the trackers and home
page have been set up, so such things will get more attention. The tests
should also run in different environments (different Pylons and Python
versions etc.)

-- Christoph
--
You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group.
To post to this group, send email to turbogears-***@googlegroups.com.
To unsubscribe from this group, send email to turbogears-trunk+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en.
Michael Pedersen
14 years ago
Permalink
Oh, completely agreed on that count. Trying very very hard to keep the tests
in good working order. Was kind of weird, actually. During my testing I got
an extra failure that didn't seem to make sense. Turns out I was switching
from tg2.0 to tg2.1 and back, and left around a bad .pyc file. Fortunately,
a fix was easy:
http://codersbuffet.blogspot.com/2011/03/git-script-for-python.html
...
--
Michael J. Pedersen
My IM IDs: Jabber/***@icelus.tzo.com, ICQ/103345809, AIM/pedermj022171
Yahoo/pedermj2002, MSN/***@hotmail.com
--
You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group.
To post to this group, send email to turbogears-***@googlegroups.com.
To unsubscribe from this group, send email to turbogears-trunk+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en.
Loading...