1. Ian Bicking
  2. WebOb
Issue #11 resolved

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

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. Log in to comment