tests.test_misc.test_multidict_cgi() fails with some options passed to nosetests

Create issue
Issue #11 resolved
Arfrever Frehtes Taifersar Arahesis created an issue

When nosetests is called with some options using "--option=argument" style (instead of "--option argument"), then tests.test_misc.test_multidict_cgi() fails. I use WebOb 1.0.7.

Examples of failing commands: {{{ nosetests --verbosity=2 nosetests --where=tests }}}

Output of failing test: {{{ ====================================================================== FAIL: tests.test_misc.test_multidict_cgi

Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/nose/case.py", line 187, in runTest self.test(*self.arg) File "/var/tmp/portage/dev-python/webob-1.0.7/work/WebOb-1.0.7/tests/test_misc.py", line 138, in test_multidict_cgi eq(repr(ua.getall('fs')), "[FieldStorage(None, u'\xf8', [])]") File "/usr/lib64/python2.7/site-packages/nose/tools.py", line 31, in eq_ assert a == b, msg or "%r != %r" % (a, b) AssertionError: "[FieldStorage(None, u'\xf8', [MiniFieldStorage('--where', 'tests')])]" != "[FieldStorage(None, u'\xf8', [])]" """Shorthand for 'assert a == b, "%r != %r" % (a, b) """

assert "[FieldStorage(None, u'\xf8', [MiniFieldStorage('--where', 'tests')])]" == "[FieldStorage(None, u'\xf8', [])]", None or "%r != %r" % ("[FieldStorage(None, u'\xf8', [MiniFieldStorage('--where', 'tests')])]", "[FieldStorage(None, u'\xf8', [])]")


Comments (10)

  1. Sergey Schetinin

    I mean understand what's happening (cgi.FieldStorage parses sys.argv as part of the request, I do remember seeing code like that in cgi.py), but I can't reproduce it here, and therefore can't fix it either.

  2. Arfrever Frehtes Taifersar Arahesis reporter

    I use regularly updated snapshots of Python 2.7, which are provided in a supplementary repository for Gentoo Linux. Currently I use 2.7.2_pre20110424. Could you check the newest snapshot of 2.7 branch?

  3. Log in to comment