nose-devs/nose — Issue #311: Syntax error when building bdist_wininst - assertion is always true in proxy.py
Author: jpellerin
Created: 2011-12-14 16:07:18+00:00
State: closed

What steps will reproduce the problem?
1. python setup.py bdist_wininst (using Python 2.6)

What is the expected output? What do you see instead?
No errors. You get the error
D:\Data\PySrc\nose-0.10.4\nose\proxy.py:93: SyntaxWarning: assertion is
always true, perhaps remove parentheses?
assert (test is self.test

What version of the product are you using? On what operating system?
nose 0.10.4, Python 2.6 on Windows XP

Please provide any additional information below.
Here's a patch to proxy.py that fixes the issue:

--- .\nose\proxy.py 2008-03-23 13:59:04.000000000 +0000
+++ .\nose\proxy.py.new 2008-12-16 16:09:39.790335900 +0000
@@ -92,7 +92,7 @@
case = getattr(self.test, 'test', None)
assert (test is self.test
or test is case
- or test is getattr(case, '_nose_case', None),
+ or test is getattr(case, '_nose_case', None)), (
"ResultProxy for %r (%s) was called with test %r (%s)"
% (self.test, id(self.test), test, id(test)))

Google Code Info:
Issue #: 222
Author: p.f.mo...@gmail.com
Created On: 2008-12-16T16:17:27.000Z
Closed On: 2009-07-19T01:55:44.000Z