Commit Graph

38 Commits

Author SHA1 Message Date
Mike Bayer 8712ef2f81 - Added new checks for the common error case of passing mapped classes
or mapped instances into contexts where they are interpreted as
SQL bound parameters; a new exception is raised for this.
fixes #3321
2015-08-22 12:47:13 -04:00
Mike Bayer b577afcb2b - rework profiling, zoomark tests into single tests so that
they can be used under xdist
2014-08-16 19:49:07 -04:00
Mike Bayer 1fc440393a - fully flake8 test/aaa_profiling 2014-07-09 18:59:16 -04:00
Mike Bayer 2f150bee28 - rename __multiple__ to __backend__, and apply __backend__ to a large number of tests.
- move out logging tests from test_execute to test_logging
2014-03-24 11:33:53 -04:00
Mike Bayer 4b614b9b35 - the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
2013-04-27 19:53:57 -04:00
Mike Bayer a5ede47f12 A major fix to the way in which a select() object produces
labeled columns when apply_labels() is used; this mode
produces a SELECT where each column is labeled as in
<tablename>_<columnname>, to remove column name collisions
for a multiple table select.   The fix is that if two labels
collide when combined with the table name, i.e.
"foo.bar_id" and "foo_bar.id", anonymous aliasing will be
applied to one of the dupes.  This allows the ORM to handle
both columns independently; previously, 0.7
would in some cases silently emit a second SELECT for the
column that was "duped", and in 0.8 an ambiguous column error
would be emitted.   The "keys" applied to the .c. collection
of the select() will also be deduped, so that the "column
being replaced" warning will no longer emit for any select()
that specifies use_labels, though the dupe key will be given
an anonymous label which isn't generally user-friendly.
[ticket:2702]
2013-04-11 16:14:23 -04:00
Mike Bayer 20cdc64588 trying different approaches to test layout. in this one, the testing modules
become an externally usable package but still remains within the main sqlalchemy parent package.
in this system, we use kind of an ugly hack to get the noseplugin imported outside of the
"sqlalchemy" package, while still making it available within sqlalchemy for usage by
third party libraries.
2012-09-27 02:37:33 -04:00
Mike Bayer a2468c8a31 - [feature] To complement [ticket:2547], types
can now provide "bind expressions" and
"column expressions" which allow compile-time
injection of SQL expressions into statements
on a per-column or per-bind level.   This is
to suit the use case of a type which needs
to augment bind- and result- behavior at the
SQL level, as opposed to in the Python level.
Allows for schemes like transparent encryption/
decryption, usage of Postgis functions, etc.
[ticket:1534]
- update postgis example fully.
- still need to repair the result map propagation
here to be transparent for cases like "labeled column".
2012-08-17 18:35:25 -04:00
Mike Bayer 3986fd7626 adjustments 2012-08-11 02:57:25 -04:00
Mike Bayer 442237afaa - a new approach to profiling where we attempt to strip out
parts of the pstats that are idiosyncratic to different platforms.
the goal is no per-version assertions on tests, version differences
in theory would go into the list of profiling exceptions.
2012-08-09 16:08:48 -04:00
Mike Bayer be71c73f61 callcount tweak 2012-03-05 15:20:07 -05:00
Mike Bayer 4de3b28abc fixes to actually get tests to pass 2011-11-22 18:05:05 -05:00
Mike Bayer 46ee78431c mark all aaa_profiling tests with __requires__ = 'cpython', 2011-04-23 12:34:38 -07:00
Mike Bayer 68a350d462 - remove test.sql._base, test.engine._base, test.orm._base, move those classes to a new test.lib.fixtures module
- move testing.TestBase to test.lib.fixtures
- massive search and replace
2011-03-27 16:27:27 -04:00
Mike Bayer 3f30fb065c - The compiler extension now supports overriding the default
compilation of expression._BindParamClause including that
the auto-generated binds within the VALUES/SET clause
of an insert()/update() statement will also use the new
compilation rules. [ticket:2042]
2011-02-09 15:45:15 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer 1903e4f973 - remove some more 2.4 targets 2010-12-27 14:34:22 -05:00
Mike Bayer fe2d3e0aa2 py3k fixes 2010-12-27 14:17:10 -05:00
Mike Bayer fa2f1c5d82 - more skippage of 2.4 2010-12-23 15:51:41 -05:00
Mike Bayer 015110267e - allow cextension version to fall back to non-cextension
- start taking out "default" version, 2.4 version, only need these tests
in a relative sense
2010-12-22 20:36:20 -05:00
Mike Bayer b79a5e7640 - another heap of inlinings and now I really have to be done with this 2010-12-21 21:37:52 -05:00
Mike Bayer ecb0e53abb - modest inlinings into the MapperProperty.setup/row_processor chain 2010-12-20 20:30:29 -05:00
Mike Bayer 0996188696 - callcounts. need to find some way to make this less tedious. 2010-12-13 10:23:59 -05:00
Mike Bayer 58b2939433 - sqlalchemy.test and nose plugin moves back to being entirely
outside of "sqlalchemy" and under "test/".

Rationale:

- coverage plugin works without issue, without need for an awkward
additional package install
- command line for "nosetests" isn't polluted with SQLAlchemy options

[ticket:1949]
2010-11-28 14:19:44 -05:00
Mike Bayer 5c0d645353 - the "type_map" dictionary in sqlalchemy.types is now private,
i.e. is named "_type_map". [ticket:1870]
2010-11-28 13:07:00 -05:00
Mike Bayer e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -05:00
Mike Bayer af4285e6ad - move inline "import" statements to use new "util.importlater()" construct. cuts
down on clutter, timeit says there's a teeny performance gain, at least where
the access is compared against attr.subattr.  these aren't super-critical
calls anyway
- slight inlining in _class_to_mapper
2010-11-13 13:19:36 -05:00
Mike Bayer a9f2ed7b46 - latest distribute
- added caveats to unittest README encountered with Py2.7 + current nose 0.11.3
- call counts for py2.7.   all tests pass for sqlite + mysql-python + psycopg2
2010-07-05 19:54:46 -04:00
Mike Bayer 969c04860f almost there, some tests failing still. 2010-03-09 13:41:43 -05:00
Mike Bayer 8c17344d1e preload type affinity entries so that these comparisons don't get shoved into the callcounts 2010-03-01 17:47:58 +00:00
Mike Bayer 20d6baa09f more py3k fixes 2010-02-20 23:02:08 +00:00
Mike Bayer 874bd42726 callcounts 2010-02-16 23:42:06 +00:00
Mike Bayer ebe7f7b15e - A change to the solution for [ticket:1579] - an end-user
defined bind parameter name that directly conflicts with
a column-named bind generated directly from the SET or
VALUES clause of an update/insert generates a compile error.
This reduces call counts and eliminates some cases where
undesirable name conflicts could still occur.
2010-02-16 19:47:54 +00:00
Mike Bayer 2e8b1639f8 update counts for 2.4 2009-10-23 21:30:02 +00:00
Mike Bayer e7241263aa python3k fixes 2009-08-09 20:50:46 +00:00
Mike Bayer 328e2647be fix some profiles for 2.4 2009-08-06 22:37:38 +00:00
Mike Bayer 8fc5005dfe merge 0.6 series to trunk. 2009-08-06 21:11:27 +00:00
Mike Bayer 45cec095b4 - unit tests have been migrated from unittest to nose.
See README.unittests for information on how to run
the tests.  [ticket:970]
2009-06-10 21:18:24 +00:00