SyntaxError in test suite with Python 3.2

Issue #3198 resolved
Arfrever Frehtes Taifersar Arahesis created an issue

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)

  1. Mike Bayer repo owner

    the u() there is required as we're testing unicode keyword arguments. we have a compat function.

  2. Log in to comment