SyntaxError in test suite with Python 3.2
Issue #3198
resolved
This problem was introduced in SQLAlchemy 0.9.7.
$ python3.2 sqla_nose.py
...
======================================================================
ERROR: Failure: SyntaxError (invalid syntax (test_metadata.py, line 2708))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.2/site-packages/nose/case.py", line 133, in run
self.beforeTest(result)
File "/usr/lib64/python3.2/site-packages/nose/case.py", line 75, in beforeTest
beforeTest(self.test)
File "/usr/lib64/python3.2/site-packages/nose/proxy.py", line 117, in beforeTest
self.plugins.beforeTest(self.test)
File "/usr/lib64/python3.2/site-packages/nose/plugins/manager.py", line 99, in __call__
return self.call(*arg, **kw)
File "/usr/lib64/python3.2/site-packages/nose/plugins/manager.py", line 167, in simple
result = meth(*arg, **kw)
File "lib/sqlalchemy/testing/plugin/noseplugin.py", line 86, in beforeTest
test.test.cls.__module__,
AttributeError: 'Failure' object has no attribute 'cls'
----------------------------------------------------------------------
Ran 5933 tests in 270.246s
FAILED (SKIP=225, errors=1)
I attach patch. Tests with this patch still pass with Python 2.6 and 2.7.
Comments (5)
-
repo owner -
repo owner oh interesting, that's a side effect of the u'' issue. heh.
-
repo owner the u() there is required as we're testing unicode keyword arguments. we have a compat function.
-
repo owner - changed status to resolved
- use compat.u for python3.2, fixes
#3198
→ <<cset 2c46128a2ffa>>
-
repo owner - use compat.u for python3.2, fixes
#3198
→ <<cset e55e5f3b7008>>
- use compat.u for python3.2, fixes
- Log in to comment
I just fixed this in d7498cf4, as part of a larger rework, I'll backport that part to 0.9.