summaryrefslogtreecommitdiff
path: root/test/base/test_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* - The :meth:`.PropComparator.of_type` modifier has beenMike Bayer2014-11-241-0/+30
| | | | | | | | | | | | | | | improved in conjunction with loader directives such as :func:`.joinedload` and :func:`.contains_eager` such that if two :meth:`.PropComparator.of_type` modifiers of the same base type/path are encountered, they will be joined together into a single "polymorphic" entity, rather than replacing the entity of type A with the one of type B. E.g. a joinedload of ``A.b.of_type(BSub1)->BSub1.c`` combined with joinedload of ``A.b.of_type(BSub2)->BSub2.c`` will create a single joinedload of ``A.b.of_type((BSub1, BSub2)) -> BSub1.c, BSub2.c``, without the need for the ``with_polymorphic`` to be explicit in the query. fixes #3256
* - The ``__module__`` attribute is now set for all those SQL andMike Bayer2014-10-141-1/+38
| | | | | | | ORM functions that are derived as "public factory" symbols, which should assist with documentation tools being able to report on the target module. fixes #3218
* - A new implementation for :class:`.KeyedTuple` used by theMike Bayer2014-08-281-25/+39
| | | | | | :class:`.Query` object offers dramatic speed improvements when fetching large numbers of column-oriented rows. fixes #3176
* put fails for these various things that don't work on pypy, not sure what ↵Mike Bayer2014-03-081-1/+7
| | | | | | approach should be taken
* fix pypy failuresMike Bayer2014-03-031-2/+1
|
* - get util.get_callable_argspec() to be completely bulletproof for 2.6-3.4,Mike Bayer2014-03-021-1/+86
| | | | | methods, classes, builtins, functools.partial(), everything known so far - use get_callable_argspec() within ColumnDefault._maybe_wrap_callable, re: #2979
* restore the contracts of update/extend to the degree that the same column ↵Mike Bayer2014-02-271-0/+30
| | | | | | identity isn't appended to the list. reflection makes use of this.
* - Some changes to how the :attr:`.FromClause.c` collection behavesMike Bayer2014-02-261-1/+156
| | | | | | | | | | | | | | | | | | | | | | | when presented with duplicate columns. The behavior of emitting a warning and replacing the old column with the same name still remains to some degree; the replacement in particular is to maintain backwards compatibility. However, the replaced column still remains associated with the ``c`` collection now in a collection ``._all_columns``, which is used by constructs such as aliases and unions, to deal with the set of columns in ``c`` more towards what is actually in the list of columns rather than the unique set of key names. This helps with situations where SELECT statements with same-named columns are used in unions and such, so that the union can match the columns up positionally and also there's some chance of :meth:`.FromClause.corresponding_column` still being usable here (it can now return a column that is only in selectable.c._all_columns and not otherwise named). The new collection is underscored as we still need to decide where this list might end up. Theoretically it would become the result of iter(selectable.c), however this would mean that the length of the iteration would no longer match the length of keys(), and that behavior needs to be checked out. fixes #2974 - add a bunch more tests for ColumnCollection
* - Fixed regression where using a ``functools.partial()`` with the eventMike Bayer2014-01-041-1/+30
| | | | | | | | | | | system would cause a recursion overflow due to usage of inspect.getargspec() on it in order to detect a legacy calling signature for certain events, and apparently there's no way to do this with a partial object. Instead we skip the legacy check and assume the modern style; the check itself now only occurs for the SessionEvents.after_bulk_update and SessionEvents.after_bulk_delete events. Those two events will require the new signature style if assigned to a "partial" event listener. [ticket:2905]
* - Improvements to the system by which SQL types generate withinMike Bayer2013-12-181-0/+49
| | | | | | | | ``__repr__()``, particularly with regards to the MySQL integer/numeric/ character types which feature a wide variety of keyword arguments. The ``__repr__()`` is important for use with Alembic autogenerate for when Python code is rendered in a migration script. [ticket:2893]
* - add WeakSequence.append()Mike Bayer2013-08-181-3/+33
| | | | - fix and test weakref cleanout for WeakSequence, [ticket:2794]
* remove all remaining start/end py2k/py3k blocksMike Bayer2013-06-071-50/+35
|
* merge defaultMike Bayer2013-05-231-2/+22
|\
| * Fixed a bug where the routine to detect the correct kwargsMike Bayer2013-05-231-2/+22
| | | | | | | | | | | | being sent to :func:`.create_engine` would fail in some cases, such as with the Sybase dialect. [ticket:2732]
* | baseMike Bayer2013-05-041-8/+6
| |
* | - the raw 2to3 runMike Bayer2013-04-271-79/+80
|/ | | | - went through examples/ and cleaned out excess list() calls
* initializing _labels to an empty list so that the other methods don't throw ↵Diana Clarke2012-11-171-21/+12
| | | | exceptions in the None labels case, but rather return (), [], or {}. this is not backwards compatible, but doubt anyone is relying on those exceptions #2601
* adding _fields, _asdict() to KeyedTuple #2601Diana Clarke2012-11-171-4/+33
|
* adding tests for KeyedTuple, pep8 passDiana Clarke2012-11-171-72/+221
|
* oops! python 3 doesn't do the rich comparison cmp thingDiana Clarke2012-11-141-8/+13
|
* __sub__ was declared twice, just increasing test coverage before I change ↵Diana Clarke2012-11-131-17/+414
| | | | anything
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-4/+4
| | | | | | | 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.
* -whitespace bonanza, contdMike Bayer2012-07-281-1/+1
|
* remove WeakIdentityMapping testsMike Bayer2012-06-241-191/+0
|
* - merge attribute flag overhaul for [ticket:2358]Mike Bayer2012-04-231-0/+21
|
* - [feature] IdentitySet supports the - operatorMike Bayer2011-12-061-0/+13
| | | | | as the same as difference(), handy when dealing with Session.dirty etc. [ticket:2301]
* - Added an improved repr() to TypeEngine objectsMike Bayer2011-07-041-0/+87
| | | | | | that will only display constructor args which are positional or kwargs that deviate from the default. [ticket:2209]
* - move all the comments that got shoved below the fixture grabs back upMike Bayer2011-03-271-0/+1
|
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-20/+19
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* - alex gaynor's latest batch of pypy test fixesMike Bayer2011-03-161-1/+3
|
* rename 'frozendict' to 'immutabledict', since 'frozen' implies hashabilityMike Bayer2011-01-201-1/+1
| | | | | like frozenset which isn't really the purpose of 'immutabledict' (could be someday, in which case, we'd change the name back :) )
* - whitespace removal bonanzaMike Bayer2011-01-021-15/+15
|
* - merge default tipMike Bayer2010-12-051-2/+0
|\
| * - Fixed operator precedence rules for multipleMike Bayer2010-11-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | chains of a single non-associative operator. I.e. "x - (y - z)" will compile as "x - (y - z)" and not "x - y - z". Also works with labels, i.e. "x - (y - z).label('foo')" [ticket:1984] - Single element tuple expressions inside an IN clause parenthesize correctly, also from [ticket:1984], added tests for PG - re-fix again importlater, [ticket:1983]
* | - move sqlalchemy.test to test.libMike Bayer2010-11-151-4/+4
|/
* tidy test/base, test/ex, test/extMike Bayer2010-07-111-32/+31
|
* - Fixed @memoized_property and @memoized_instancemethodMike Bayer2010-06-191-0/+34
| | | | | | decorators so that Sphinx documentation picks up these attributes and methods, such as ResultProxy.inserted_primary_key. [ticket:1830]
* change the weakkeydict to be just an LRU cache. Add testsMike Bayer2010-05-311-0/+46
| | | | for the "many combinations of UPDATE keys" issue.
* a handy @classproperty decoratorChris Withers2010-02-231-0/+22
|
* generalized "test all the picklers" iterator works cross platformMike Bayer2010-02-221-18/+3
|
* Fixed cPickle problem in Python3.Michael Trier2010-02-201-0/+2
|
* - make frozendict serializableMike Bayer2010-01-281-0/+20
| | | | - serialize tests use HIGHEST_PROTOCOL
* python3k fixesMike Bayer2009-08-091-2/+2
|
* merge 0.6 series to trunk.Mike Bayer2009-08-061-7/+25
|
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-0/+957
See README.unittests for information on how to run the tests. [ticket:970]