Commit Graph

36 Commits

Author SHA1 Message Date
Mike Bayer fa56f0acb4 - added test for threadlocal not supporting begin_nested()
- removed query.compile(); use explicit query.with_labels().statement instead
- moved statement annotation step upwards from query._compile_context() to outliers from_self()/statement.  speeds zoomark.step_6_editing by 16%
2008-05-18 15:49:14 +00:00
Jason Kirtland dd20ca5cb9 - Removed @unsupported 2008-05-14 22:09:23 +00:00
Jason Kirtland e41c0f4107 Test suite modernization in progress. Big changes:
- @unsupported now only accepts a single target and demands a reason
   for not running the test.
 - @exclude also demands an exclusion reason
 - Greatly expanded @testing.requires.<feature>, eliminating many
   decorators in the suite and signficantly easing integration of
   multi-driver support.
 - New ORM test base class, and a featureful base for mapped tests
 - Usage of 'global' for shared setup going away, * imports as well
2008-05-09 20:26:09 +00:00
Mike Bayer 4a6afd469f r4695 merged to trunk; trunk now becomes 0.5.
0.4 development continues at /sqlalchemy/branches/rel_0_4
2008-05-09 16:34:10 +00:00
Lele Gaifax 2ffe47e32b Savepoints are supported under Firebird 2008-04-27 08:54:36 +00:00
Mike Bayer 82edfd0e91 - implemented two-phase API for "threadlocal" engine,
via engine.begin_twophase(), engine.prepare()
[ticket:936]
2008-02-26 19:32:49 +00:00
Mike Bayer c0b5a0446b - updated the naming scheme of the base test classes in test/testlib/testing.py;
tests extend from either TestBase or ORMTest, using additional mixins for
special assertion methods as needed
2008-02-11 00:28:39 +00:00
Mike Bayer e1aa7573f2 - added "autocommit=True" kwarg to select() and text(),
as well as generative autocommit() method on select();
for statements which modify the database through some
user-defined means other than the usual INSERT/UPDATE/
DELETE etc., this flag will enable "autocommit" behavior
during execution if no transaction is in progress
[ticket:915]
2008-01-31 17:48:22 +00:00
Jason Kirtland 17d3c8764e - testbase is gone, replaced by testenv
- Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase
- testing.db has the configured db
- Fixed up the perf/* scripts
2008-01-12 22:03:42 +00:00
Jason Kirtland 8128a6378a - Removed @testing.supported. Dialects in development or maintained outside
the tree can now run the full suite of tests out of the box.
- Migrated most @supported to @fails_on, @fails_on_everything_but, or (last
  resort) @unsupported.  @fails_on revealed a slew of bogus test skippage,
  which was corrected.
- Added @fails_on_everything_but.  Yes, the first usage *was*
  "fails_on_everything_but('postgres')".  How did you guess!
- Migrated @supported in dialect/* to the new test-class attribute __only_on__.
- Test classes can also have __unsupported_on__ and __excluded_on__.
2007-12-13 09:59:14 +00:00
Mike Bayer f9c8d1cf34 fixed the previous TLTransaction checkin 2007-11-07 21:46:48 +00:00
Mike Bayer af070d037b - fixed the close() method on Transaction when using strategy='threadlocal' 2007-11-07 18:31:35 +00:00
Mike Bayer 1fee09fd07 - inlined a couple of context variables
- PG two phase was calling text() without the correct bind param format, previous compiler checkin revealed issue
2007-10-27 18:45:20 +00:00
Jason Kirtland 6378c34799 - Added initial version of MaxDB dialect.
- All optional test Sequences are now optional=True
2007-10-23 07:38:07 +00:00
Ants Aasma 6bbc7dd157 change the in_ API to accept a sequence or a selectable [ticket:750] 2007-10-16 22:57:05 +00:00
Ants Aasma 47d3f45d58 - fix multiple consequent two phase transactions not working with postgres. For some reason implicit transactions are not enough. [ticket:810]
- add an option to scoped session mapper extension to not automatically save new objects to session.
2007-10-08 15:25:51 +00:00
Jason Kirtland 30f0f0cf5d - Explicitly close connections in the FOR UPDATE tests.
- Minor housekeeping.
2007-09-27 23:23:27 +00:00
Mike Bayer de1712a211 - added close() method to Transaction. closes out a transaction using rollback
if it's the outermost transaction, otherwise just ends without affecting
  the outer transaction.

- transactional and non-transactional Session integrates better with bound
  connection; a close() will ensure that connection transactional state is
  the same as that which existed on it before being bound to the Session.
2007-08-17 21:20:49 +00:00
Mike Bayer 27cf3a232d - threadlocal TLConnection, when closes for real, forces parent TLSession
to rollback/dispose of transaction
2007-08-17 19:13:51 +00:00
Mike Bayer 62410adeb9 - fixed compiler bug in mssql
- marked as unsupported for mssql all two-phase and nested transcation tests
- marked as unsupported for mssql various transactional/session tests which require two connections looking at uncommitted/external data at the same time (ms-sql cant handle it)
- put better explicit closeout step in unitofwork.py tests to appease ms-sqls hard locking
2007-08-12 21:36:33 +00:00
Paul Johnston 0013b84f8b MSSQL: disable new 0.4 tests that cause hangs 2007-08-12 20:52:07 +00:00
Mike Bayer 41c734b5a3 attempting to get oracle XID to work. not there yet. 2007-08-11 01:08:42 +00:00
Mike Bayer 1391efea78 repaired oracle savepoint implementation 2007-08-11 00:03:26 +00:00
Jason Kirtland b8588ef4f7 - Dialects can be queried for the server version (sqlite and mysql only with this commit)
- Mark everything in a test suite as failed when setUpAll fails.
- Added test coverage for Unicode table names in metadata.reflect()
- @testing.exclude() filters out tests by server version
- Applied exclude to the test suite, MySQL 4.1 passes again (no XA or SAVEPOINT)
- Removed MySQL charset-setting pool hook- charset=utf8&use_unicode=0 works just as well.  (Am I nuts?  I'd swear this didn't work before.)
- Finally migrated some old MySQL-tests into the dialect test module
- Corrected 'commit' and 'rollback' logic (and comment) for ancient MySQL versions lacking transactions entirely
- Deprecated the MySQL get_version_info in favor of server_version_info
- Added a big hunk-o-doc for MySQL.
2007-08-03 02:38:00 +00:00
Mike Bayer ed4fc64bb0 merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to maintenance branch in branches/rel_0_3. 2007-07-27 04:08:53 +00:00
Rick Morrison 66a74c136f revert old unittest patch for MSSQL 2007-02-15 00:22:07 +00:00
Mike Bayer 0b90751a1c test patches from [ticket:422] 2007-01-23 21:14:54 +00:00
Mike Bayer 8a59bbed49 added additional unit test to test that commit errors are detected, rollback occurs in an except: 2006-12-14 23:10:10 +00:00
Mike Bayer 6dd59b1994 added InnoDB for mysql so that all tranactional tests pass for mysql 2006-12-14 23:03:43 +00:00
Mike Bayer e812785c2d - logging is now implemented via standard python "logging" module.
"echo" keyword parameters are still functional but set/unset
log levels for their respective classes/instances.  all logging
can be controlled directly through the Python API by setting
INFO and DEBUG levels for loggers in the "sqlalchemy" namespace.
class-level logging is under "sqlalchemy.<module>.<classname>",
instance-level logging under "sqlalchemy.<module>.<classname>.<hexid>".
Test suite includes "--log-info" and "--log-debug" arguments
which work independently of --verbose/--quiet.  Logging added
to orm to allow tracking of mapper configurations, row iteration
fixes [ticket:229] [ticket:79]
2006-09-24 23:59:22 +00:00
Mike Bayer a88e4c9a2b - fixed bug where Connection wouldnt lose its Transaction
after commit/rollback
2006-09-12 20:06:42 +00:00
Mike Bayer 0e0cedaf9d identified another TLTransaction scenario, and adjusted TLConnection/TLSession to fix this as well (reverted previous change, and overriding in_transaction() instead) 2006-06-22 20:03:09 +00:00
Mike Bayer 5f3451fcc3 TLConnection insures that it is used to create a transaction via the session when begin() is called, so that it has proper transactional context, + unittests 2006-06-22 19:46:44 +00:00
Mike Bayer 53faada96c fixed nested rollbacks 2006-06-14 15:50:40 +00:00
Mike Bayer 82ee832c8d more fixes to transaction nesting, interacts better with close() statement 2006-06-05 18:25:35 +00:00
Mike Bayer 120dcee5a7 reorganized unit tests into subdirectories 2006-06-05 17:25:51 +00:00