Commit Graph

632 Commits

Author SHA1 Message Date
Michael Trier 951fe224fa Corrected problem with detecting closed connections. Fixed issues in reflecttable for reflecting the mssql tables. Removed unicode reflection test from mssql. Need to investigate this further. 2008-07-23 05:10:04 +00:00
Jason Kirtland b155b60280 - Spiffed up the deprecated decorators & @flipped 'em up top 2008-07-16 17:34:41 +00:00
Jason Kirtland 8fa48edbf9 - Removed 2.3 set emulations/enhancements.
(sets.Set-based collections & DB-API returns still work.)
2008-07-15 19:23:52 +00:00
Michael Trier cec5947b5b Refactored the mock_engine in the tests so it's not duplicated in several places. Closes #1098 2008-07-08 01:37:38 +00:00
Michael Trier 9d7c6901cb Added prefixes option to that accepts a list of string to insert after CREATE in the CREATE TABLE statement. Closes #1075. 2008-07-05 03:31:30 +00:00
Mike Bayer 1b1b68a337 merged r4809 from rel_0_4, oracle fix 2008-05-24 17:11:41 +00:00
Jason Kirtland af11465840 - Moved an ORM test out of engine... 2008-05-21 03:31:20 +00:00
Jason Kirtland 18a31d0316 - Quick cleanup of defaults.py. The main DefaultTest is still a mess. 2008-05-20 00:14:51 +00:00
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
Lele Gaifax f56065c098 Correct failure reason 2008-05-15 00:07:00 +00:00
Jason Kirtland dd20ca5cb9 - Removed @unsupported 2008-05-14 22:09:23 +00:00
Jason Kirtland 65f4f02ec8 Columns now have default= and server_default=. PassiveDefault fades away. 2008-05-14 19:49:40 +00:00
Lele Gaifax 78c9603af4 Tag some tests that fail under Firebird 2008-05-13 09:06:27 +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
Jason Kirtland 2a3f58b5b8 Pass connection to get_default_schema_name 2008-04-13 16:21:17 +00:00
Jason Kirtland afd8431d4d - Pool listeners may now be specified as a duck-type of PoolListener or a dict of callables, your choice. 2008-04-04 19:07:30 +00:00
Jason Kirtland 2d1acf1abc - Don't create implicit DDL column defaults 2008-03-11 23:16:10 +00:00
Jason Kirtland 38606681e7 - Gave DDL() statements the same .bind treatment as the DML ones in r4220 2008-03-04 22:47:35 +00:00
Jason Kirtland 70d8a9c7a6 - Updated exception messaging for r4220 2008-03-04 21:35:15 +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 47418e0f87 - added exception wrapping/reconnect support to result set
fetching.  Reconnect works for those databases that
raise a catchable data error during results
(i.e. doesn't work on MySQL) [ticket:978]
2008-02-25 18:32:11 +00:00
Mike Bayer 14b3a913ac fixing recent schema.py changes to work with oracle 'owner' attribute 2008-02-14 23:41:17 +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 90c572b513 - Table columns and constraints can be overridden on a
an existing table (such as a table that was already
reflected) using the 'useexisting=True' flag, which now
takes into account the arguments passed along with it.
- fixed one element of [ticket:910]
- refactored reflection test
2008-02-10 23:39:09 +00:00
Jason Kirtland 6d843aeeb2 - Added free-form DDL statements, can be executed standalone or tied to the DDL create/drop lifecycle of Tables and MetaData. [ticket:903]
- Added DDL event hooks, triggers callables before and after create / drop.
2008-02-05 05:46:33 +00:00
Jason Kirtland 3aed5fa544 - Friendlier exception messages for unbound, implicit execution
- Implicit binding failures now raise UnboundExecutionError
2008-01-31 19:48:13 +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 c194962019 - Undeclared SAWarnings are now fatal to tests as well.
- Fixed typo that was killing runs of individual named tests.
2008-01-12 04:52:05 +00:00
Mike Bayer 062b8c0eb1 - added extra fk override test
- proper error message is raised when trying to
access expired instance attributes with no session
present
2008-01-10 18:05:20 +00:00
Jason Kirtland bf36c648f2 Reworked r4042- undeclared deprecation warnings are now *fatal* to tests. No surprises. 2008-01-10 02:37:39 +00:00
Jason Kirtland 84576e3258 test suite deprecation rampage 2008-01-09 22:54:51 +00:00
Mike Bayer eefd1f78a2 redid the _for_ddl String/Text deprecation warning correctly [ticket:912] 2008-01-09 18:09:49 +00:00
Mike Bayer 57201ca878 - added is_disconnect() support for oracle
- fixed _handle_dbapi_error to detect endless loops, doesn't call rollback/cursor.close
etc. in case of disconnect
2007-12-29 20:13:50 +00:00
Mike Bayer b9b0aca757 - auto-reconnect support improved; a Connection can now automatically
reconnect after its underlying connection is invalidated, without
needing to connect() again from the engine.  This allows an ORM session
bound to a single Connection to not need a reconnect.
Open transactions on the Connection must be rolled back after an invalidation
of the underlying connection else an error is raised.  Also fixed
bug where disconnect detect was not being called for cursor(), rollback(),
or commit().
2007-12-19 19:51:46 +00:00
Lele Gaifax fee8fe3391 Use an explicit ordering in the query 2007-12-18 13:06:24 +00:00
Lele Gaifax c0f48e8383 Firebird does use qmark style params 2007-12-13 20:16:23 +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
Lele Gaifax 16810e4011 New simple test for Dialect.has_sequence() 2007-12-12 17:24:56 +00:00
Mike Bayer a5f2aab9e0 - tables with schemas can still be used in sqlite, firebird,
schema name just gets dropped [ticket:890]
2007-12-05 21:14:09 +00:00
Mike Bayer 6ed4645f02 opened up the test for "reflection with convert_unicode=True". this is since convert_unicode by default has assert_unicode, want to ensure that other dialects (at least oracle) support this (i.e. not unicode schema names themselves, just that they dont sent thru bytestrings to a String).
if maxdb or sybase *should* be able to handle this too though I can't test on this end.
2007-11-27 16:23:02 +00:00
Jason Kirtland ea627ebe5c Migrated Connection.properties to Connection.info ('info' is the new standard name for user-writable property collections that came out of [ticket:573]). 'properties' is now an alias, will be removed in 0.5. 2007-11-18 18:19:52 +00:00
Mike Bayer 43d476ce60 - oracle will now reflect "DATE" as an OracleDateTime column, not
OracleDate

- added awareness of schema name in oracle table_names() function,
fixes metadata.reflect(schema='someschema') [ticket:847]
2007-11-18 02:44:15 +00:00
Jason Kirtland 7f85c1e443 - Pool listeners preserved on pool.recreate()
- Docstring rampage
2007-11-10 19:31:06 +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