fix tests on python 3.2

Issue #2088 resolved
Mike Bayer repo owner created an issue

3.2 allowed non-attribute exceptions to propagate from hasattr(). a couple of tests which are specifically testing our workarounds for the old behavior choke on this.

Comments (8)

  1. Mike Bayer reporter

    I think due to the usage of __getattr__ on the _Group class we are stuck raising InvalidRequestError and a behavioral change with Py3.2.

    I would add this test to SelectTest.test_attribute_sanity as well, using the conditional approach:

    assert not hasattr(select([table1.c.myid](table1.c.myid)).as_scalar(), 'columns')
    

    and also rename py3_2k to py32.

  2. Former user Account Deleted

    (original author: taavi) Note that even with 2088-take2.patch there are still 8 failures when running py3.2 sqlite: * {{{test.aaa_profiling.test_pool.QueuePoolTest.test_first_connect}}} (55 vs 72) * {{{test.aaa_profiling.test_pool.QueuePoolTest.test_second_connect}}} (23 vs 32) * {{{test.aaa_profiling.test_pool.QueuePoolTest.test_second_samethread_connect}}} (7 vs 6) * {{{test.engine.test_pool.QueuePoolTest.test_max_overflow}}} ({{{assert not pool._refs}}}) * {{{test.engine.test_pool.QueuePoolTest.test_mixed_close}}} ({{{assert not pool._refs}}}) * {{{test.engine.test_pool.QueuePoolTest.test_no_overflow}}} ({{{assert not pool._refs}}}) * {{{test.engine.test_pool.QueuePoolTest.testqueuepool_close}}} ({{{assert not pool._refs}}}) * {{{test.engine.test_pool.QueuePoolTest.testqueuepool_del}}} ({{{assert not pool._refs}}})

  3. Log in to comment