Commit Graph

95 Commits

Author SHA1 Message Date
Michael Trier 6a9b2cb683 Flagged another transaction test as causing mssql to hang. Need to look into these. 2008-11-10 01:11:46 +00:00
Michael Trier d360fd7fe3 Corrected issue with decimal e notation that broke regular decimal tests for mssql. 2008-11-10 01:11:43 +00:00
Michael Trier 4cd99f5536 Global propigate -> propagate change to correct spelling. Additionally found a couple of insures that should be ensure. 2008-11-09 01:53:08 +00:00
Mike Bayer 223bd3688d oracle doesnt seem to like CLOB in unions.... 2008-10-18 17:45:04 +00:00
Mike Bayer 1127b10b27 - "not equals" comparisons of simple many-to-one relation
to an instance will not drop into an EXISTS clause
and will compare foreign key columns instead.

- removed not-really-working use cases of comparing
a collection to an iterable.  Use contains() to test
for collection membership.

- Further simplified SELECT compilation and its relationship
to result row processing.

- Direct execution of a union() construct will properly set up
result-row processing. [ticket:1194]
2008-10-18 17:34:52 +00:00
Michael Trier cba429c0bc Change in #1165 tests to prevent MySQL from choking on a varchar without a length. 2008-10-04 23:46:02 +00:00
Mike Bayer f487169777 - added a few more assertions for [ticket:1165]
- removed non-2.5 partial.keywords, partial.name, etc., not sure what those are getting us here
2008-10-04 16:09:16 +00:00
Michael Trier dc5f360cd3 Didnt think about <2.5. When will I learn. 2008-10-04 02:57:19 +00:00
Michael Trier 56e88ed7c3 Allowed column types to be callables. Fixes #1165. 2008-10-04 01:49:14 +00:00
Mike Bayer 8d2fd5f87a - Overhauled SQLite date/time bind/result processing
to use regular expressions and format strings, rather
than strptime/strftime, to generically support
pre-1900 dates, dates with microseconds.  [ticket:968]
2008-09-19 22:59:28 +00:00
Mike Bayer 36570c6595 - Dropped 0.3-compatibility for user defined types
(convert_result_value, convert_bind_param).
2008-09-07 00:13:28 +00:00
Mike Bayer 6f60e76883 - The 'length' argument to all Numeric types has been renamed
to 'scale'.  'length' is deprecated and is still accepted
with a warning. [ticket:827]
- The 'length' argument to MSInteger, MSBigInteger, MSTinyInteger,
MSSmallInteger and MSYear has been renamed to 'display_width'.
[ticket:827]
- mysql._Numeric now consumes 'unsigned' and 'zerofill' from
the given kw, so that the same kw can be passed along to Numeric
and allow the 'length' deprecation logic to still take effect
- added testlib.engines.all_dialects() to return a dialect for
every db module
- informix added to sqlalchemy.databases.__all__.  Since other
"experimental" dbs like access and sybase are there, informix
should be as well.
2008-08-24 19:52:54 +00:00
Jason Kirtland 8b12c8f1c2 - Removed 2.3 Decimal compat 2008-07-15 19:40:08 +00:00
Mike Bayer f3a9acc7e2 merge r4889, SQLite Float type, from 0.4 branch 2008-07-02 18:29:36 +00:00
Jason Kirtland dd20ca5cb9 - Removed @unsupported 2008-05-14 22:09:23 +00:00
Lele Gaifax 52c965a188 Tagged two tests that fail under Firebird 2008-05-12 10:10:21 +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 84ec085d47 MSText no longer implicitly creates TEXT for string with no length
(this actually allows CAST (foo, VARCHAR) to render too)
2008-05-09 19:00:55 +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
Mike Bayer f16c41b00b fixed OracleRaw type adaptation [ticket:902] 2008-04-02 17:34:24 +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
Lele Gaifax 668a8ae21b Avoid using common keywords as field names: the test executes literal selects 2008-02-06 17:52:48 +00:00
Jason Kirtland 342adac637 - Cover 2.3 Decimal fallback 2008-01-22 18:06:46 +00:00
Jason Kirtland 412c80dd6c - 2.3 fixup, part two: 100% passing for sqlite
- added 2.4-style binops to util.Set on 2.3
  - OrderedSets pickle on 2.3
  - more lib/sqlalchemy set vs Set corrections
  - fixed InstrumentedSet.discard for 2.3
  - set, sorted compatibility for test suite
- added testing.fails_if decorator
2008-01-21 23:19:39 +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
Jason Kirtland 3e9df22546 Include column name in length-less String warning (more [ticket:912]) 2008-01-10 23:16:56 +00:00
Jason Kirtland c83bb94e0d Added UnicodeText alias 2008-01-09 20:22:41 +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 a8b62a02dd - further fix to new TypeDecorator, so that subclasses of TypeDecorators work properly
- _handle_dbapi_exception() usage changed so that unwrapped exceptions can be rethrown with the original stack trace
2008-01-02 01:29:38 +00:00
Mike Bayer 226a95cb4f fix to new TypeDecorator 2008-01-01 01:47:58 +00:00
Mike Bayer 267523e4da - sqlite SLDate type will not erroneously render "microseconds" portion
of a datetime or time object when sent to the DB.
2007-12-20 01:45:36 +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
Mike Bayer df68f30777 get most oracle tests in sql working again.... 2007-12-18 06:13:42 +00:00
Mike Bayer 8cf05355bb oof...unicode object still needs to return the value if it just warned... 2007-12-14 23:47:33 +00:00
Mike Bayer c9b3f0bcef - added new methods to TypeDecorator, process_bind_param() and
process_result_value(), which automatically take advantage of the processing
of the underlying type.  Ideal for using with Unicode or Pickletype.
TypeDecorator should now be the primary way to augment the behavior of any
existing type including other TypeDecorator subclasses such as PickleType.
2007-12-08 23:03:22 +00:00
Mike Bayer 594784a206 assert_unicode=True replaced with default of assert_unicode='warn' 2007-12-05 22:21:37 +00:00
Mike Bayer d56e11ffe2 default value of assert_unicode is None on String, False on create_engine(), and True on Unicode type. 2007-11-28 00:44:16 +00:00
Paul Johnston 2c873f0ee4 Fix: test_decimal on MSSQL - use a value that is accurately represented as a float, and make when asdecimal=False, convert Decimal to float 2007-11-25 23:34:39 +00:00
Mike Bayer e4056a1787 - added new flag to String and create_engine(), assert_unicode=(True|False|None).
When convert_unicode=True, this flag also defaults to `True`, and results in all
unicode conversion operations raising an exception when a non-unicode bytestring
is passed as a bind parameter.  It is strongly advised that all unicode-aware
applications make proper use of Python unicode objects (i.e. u'hello' and
not 'hello').
2007-11-25 23:14:03 +00:00
Mike Bayer ea46e556f9 - anonymous column expressions are automatically labeled.
e.g. select([x* 5]) produces "SELECT x * 5 AS anon_1".
    This allows the labelname to be present in the cursor.description
    which can then be appropriately matched to result-column processing
    rules. (we can't reliably use positional tracking for result-column
    matches since text() expressions may represent multiple columns).

  - operator overloading is now controlled by TypeEngine objects - the
    one built-in operator overload so far is String types overloading
    '+' to be the string concatenation operator.
    User-defined types can also define their own operator overloading
    by overriding the adapt_operator(self, op) method.

  - untyped bind parameters on the right side of a binary expression
    will be assigned the type of the left side of the operation, to better
    enable the appropriate bind parameter processing to take effect
    [ticket:819]
2007-11-10 03:02:16 +00:00
Jason Kirtland c2092c7254 - Refinements for maxdb's handling of SERIAL and FIXED columns
- Expanded maxdb's set of paren-less functions
2007-10-31 00:28:53 +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
Roger Demetrescu 69ba01265e Firebird: added Float and Time types (FBFloat and FBTime). Fixed BLOB SUB_TYPE for TEXT and Binary types.
Firebird's string types are tested in testtypes.py
2007-10-12 06:02:15 +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 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
Jason Kirtland 73b0c40946 - Tweaked the sql.text date test 2007-10-02 20:58:58 +00:00
Jason Kirtland 1880e6d8c3 - Unraveled DateTest, removed bogus coverage omission for MySQL TIME types 2007-10-02 20:51:17 +00:00
Mike Bayer e37a3a961c - the behavior of String/Unicode types regarding that they auto-convert
to TEXT/CLOB when no length is present now occurs *only* for an exact type
  of String or Unicode with no arguments.  If you use VARCHAR or NCHAR
  (subclasses of String/Unicode) with no length, they will be interpreted
  by the dialect as VARCHAR/NCHAR; no "magic" conversion happens there.
  This is less surprising behavior and in particular this helps Oracle keep
  string-based bind parameters as VARCHARs and not CLOBs [ticket:793].
2007-09-26 14:55:44 +00:00
Jason Kirtland fba14f6047 from foo import (name, name) isn't valid syntax for 2.3. ah well.
omitting modules from sqlalchemy.__all__...
2007-08-21 22:20:52 +00:00