Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1106 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] Fixes for test_sqlalchemy.py

Reported by: bjourne Owned by: anonymous
Priority: normal Milestone: 1.0b2
Component: Tests Version: 0.9a6
Severity: normal Keywords:


On my machine this module fails because SQLAlchemy's exception in test_raise_sa_exception is an OperationalError? instead of a IntegrityError?. I think this is because version differences in sqlite and pysqlite. See  http://www.initd.org/tracker/pysqlite/ticket/106 for example.

Also I noticed that the tests are dependent on each other. For example nosetests test_sqlalchemy.py:test_query_in_session would always fail because test_create_and_query() isn't run before it. Making tests depend on each other is a big nono because nosetests doesn't make any guarantees in which order tests will be run. The patch makes the test independent.

Also I rearranged the file slightly because it looks better if all the setup/teardown code is in one place.


fix-sqlalchemy-test.patch Download (2.4 KB) - added by bjourne 13 years ago.

Change History

Changed 13 years ago by bjourne

comment:1 Changed 13 years ago by jorge.vargas

  • Component changed from TurboGears to tests
  • Milestone set to 1.0b2

comment:2 Changed 13 years ago by alberto

  • Status changed from new to closed
  • Resolution set to fixed

Comitted at [1922] Thanks!

Note: See TracTickets for help on using tickets.