Commit Graph

170 Commits

Author SHA1 Message Date
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
Mike Bayer f32131dac2 - added test coverage for unknown type reflection, fixed
sqlite/mysql handling of type reflection for unknown types
2007-10-18 17:56:18 +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
Mike Bayer cc0e7c796f - string-based query param parsing/config file parser understands
wider range of string values for booleans [ticket:817]
2007-10-16 21:33:21 +00:00
Mike Bayer 5b92c3d097 - PG reflection, upon seeing the default schema name being used explicitly
as the "schema" argument in a Table, will assume that this is the the
  user's desired convention, and will explicitly set the "schema" argument
  in foreign-key-related reflected tables, thus making them match only
  with Table constructors that also use the explicit "schema" argument
  (even though its the default schema).
  In other words, SA assumes the user is being consistent in this usage.
2007-10-14 19:15:09 +00:00
Jason Kirtland be6f2a9c5b Added test for DBAPIError exception wrapping. 2007-10-14 16:31:21 +00:00
Jason Kirtland c1a8db6791 - sqlite housekeeping- added dialect test & moved tests there, pruned the dialect's reserved words. 2007-10-11 17:35:13 +00:00
Mike Bayer ddf875dd0c - initial sybase support checkin, [ticket:785] 2007-10-10 15:19:28 +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
Roger Demetrescu 11c70f9d8d Firebird dialect now uses SingletonThreadPool as its poolclass.
(this fixes all "unsuccessful metadata update\n  object XXXXX is in use" test errors)

Minor fixes in tests
2007-10-07 00:06:05 +00:00
Mike Bayer 29291f4c32 - oracle does not implicitly convert to unicode for non-typed result
sets (i.e. when no TypeEngine/String/Unicode type is even being used;
  previously it was detecting DBAPI types and converting regardless).
  should fix [ticket:800]
- fixed oracle out_parameters, likely broke in beta6
- fixed oracle _normalize_case for encoded names, gets unicode reflection test to work
- a few extra tests tweaked/unsupported for oracle
2007-10-06 16:12:58 +00:00
Mike Bayer 6695831403 - fixed sqlite reflection of BOOL/BOOLEAN [ticket:808] 2007-10-05 18:14:11 +00:00
Jason Kirtland 6fb5f1047c Adjusted reserved word reflection test for oracle-style identifier dialects. But probably the CheckConstraint part of this test should just be removed, as it's testing a non-extant feature. 2007-10-04 18:31:31 +00:00