summaryrefslogtreecommitdiff
path: root/test/orm/_fixtures.py
Commit message (Collapse)AuthorAgeFilesLines
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-3/+3
| | | | | | | 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.
* - fix empty row insert in fixture, [ticket:2573]Mike Bayer2012-09-261-1/+1
|
* -whitespace bonanza, contdMike Bayer2012-07-281-1/+1
|
* begin implementing inspection system for #2208Mike Bayer2012-04-031-1/+44
|
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-2/+2
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* - move all the setup_classes(cls) and setup_mappers(cls) to use aMike Bayer2011-03-271-1/+1
| | | | | local cls.Basic, cls.Comparable base class so that there is no ambiguity or hash identity behaviors getting in the way of class registration.
* - convert @provide_metadata to use self accessMike Bayer2011-03-261-1/+0
| | | | | - having occasional issues with BasicEntity grabbing, if it persists may have to pass an explicit base class into setup_classes()/setup_mappers()
* - move _fixtures to work via the normal methods of _base.MappedTest, convertMike Bayer2011-03-261-52/+50
| | | | | | | all referncing tests to not use globals - tests that deal with pickle specifically load the fixture classes from test.lib.pickleable, which gets some more classes added - removed weird sa05 pickling tests that don't matter
* - move _fixtures into the traditional FixtureTest form. will adjustMike Bayer2011-03-261-182/+187
| | | | old style tests
* - whitespace removal bonanzaMike Bayer2011-01-021-4/+4
|
* - move sqlalchemy.test to test.libMike Bayer2010-11-151-3/+3
|
* - Fixed bug which affected all eagerload() and similar optionsMike Bayer2010-03-221-1/+1
| | | | | | | | such that "remote" eager loads, i.e. eagerloads off of a lazy load such as query(A).options(eagerload(A.b, B.c)) wouldn't eagerload anything, but using eagerload("b.c") would work fine. - subquery eagerloading very close
* and here's where it gets *fun* ! so much for being easyMike Bayer2010-03-221-0/+43
|
* merge 0.6 series to trunk.Mike Bayer2009-08-061-2/+2
|
* - sqlalchemy.orm.join and sqlalchemy.orm.outerjoin are nowMike Bayer2009-07-121-0/+15
| | | | | | | | | | | | added to __all__ in sqlalchemy.orm.*. [ticket:1463] - Fixed bug where Query exception raise would fail when a too-short composite primary key value were passed to get(). [ticket:1458] - rearranged CHANGES for 0.5.5 to be somewhat severity based. - commented on [ticket:1445]
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-27/+16
| | | | | See README.unittests for information on how to run the tests. [ticket:970]
* don't INSERT a blank row if no rows passed. (breaks all the tests for SQLite ↵Mike Bayer2009-01-111-3/+4
| | | | on the buildbot....)
* - Concrete inheriting mappers now instrument attributes which are inherited ↵Mike Bayer2009-01-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the superclass, but are not defined for the concrete mapper itself, with an InstrumentedAttribute that issues a descriptive error when accessed. [ticket:1237] - Added a new `relation()` keyword `back_populates`. This allows configuation of backreferences using explicit relations. [ticket:781] This is required when creating bidirectional relations between a hierarchy of concrete mappers and another class. [ticket:1237] - Test coverage added for `relation()` objects specified on concrete mappers. [ticket:1237] - A short documentation example added for bidirectional relations specified on concrete mappers. [ticket:1237] - Mappers now instrument class attributes upon construction with the final InstrumentedAttribute object which remains persistent. The `_CompileOnAttr`/`__getattribute__()` methodology has been removed. The net effect is that Column-based mapped class attributes can now be used fully at the class level without invoking a mapper compilation operation, greatly simplifying typical usage patterns within declarative. [ticket:1269] - Index now accepts column-oriented InstrumentedAttributes (i.e. column-based mapped class attributes) as column arguments. [ticket:1214] - Broke up attributes.register_attribute into two separate functions register_descriptor and register_attribute_impl. The first assembles an InstrumentedAttribute or Proxy descriptor, the second assembles the AttributeImpl inside the InstrumentedAttribute. register_attribute remains for outside compatibility. The argument lists have been simplified. - Removed class_manager argument from all but MutableScalarAttributeImpl (the branch had removed class_ as well but this has been reverted locally to support the serializer extension). - Mapper's previous construction of _CompileOnAttr now moves to a new MapperProperty.instrument_class() method which is called on all MapperProperty objects at the moment the mapper receives them. All MapperProperty objects now call attributes.register_descriptor within that method to assemble an InstrumentedAttribute object directly. - InstrumentedAttribute now receives the "property" attribute from the given PropComparator. The guesswork within the constructor is removed, and allows "property" to serve as a mapper compilation trigger. - RelationProperty.Comparator now triggers compilation of its parent mapper within a util.memoized_property accessor for the "property" attribute, which is used instead of "prop" (we can probably remove "prop"). - ColumnProperty and similar handle most of their initialization in their __init__ method since they must function fully at the class level before mappers are compiled. - SynonymProperty and ComparableProperty move their class instrumentation logic to the new instrument_class() method. - LoaderStrategy objects now add their state to existing InstrumentedAttributes using attributes.register_attribute_impl. Both column and relation-based loaders instrument in the same way now, with a unique InstrumentedAttribute *and* a unique AttributeImpl for each class in the hierarchy. attribute.parententity should now be correct in all cases. - Removed unitofwork.register_attribute, and simpified the _register_attribute methods into a single function in strategies.py. unitofwork exports the UOWEventHandler extension directly. - To accomodate the multiple AttributeImpls across a class hierarchy, the sethasparent() method now uses an optional "parent_token" attribute to identify the "parent". AbstractRelationLoader sends the MapperProperty along to serve as this token. If the token isn't present (which is only the case in the attributes unit tests), the AttributeImpl is used instead, which is essentially the same as the old behavior. - Added new ConcreteInheritedProperty MapperProperty. This is invoked for concrete mappers within _adapt_inherited_property() to accomodate concrete mappers which inherit unhandled attributes from the base class, and basically raises an exception upon access. [ticket:1237] - attributes.register_attribute and register_descriptor will now re-instrument an attribute unconditionally without checking for a previous attribute. Not sure if this is controversial. It's needed so that ConcreteInheritedProperty instrumentation can be overridden by an incoming legit MapperProperty without any complexity. - Added new UninstrumentedColumnLoader LoaderStrategy. This is used by the polymorphic_on argument when the given column is not represented within the mapped selectable, as is typical with a concrete scenario which maps to a polymorphic union. It does not configure class instrumentation, keeping polymorphic_on from getting caught up in the new concrete attribute-checking logic. - RelationProperty now records its "backref" attributes using a set assigned to `_reverse_property` instead of a scalar. The `back_populates` keyword allows any number of properties to be involved in a single bidirectional relation. Changes were needed to RelationProperty.merge(), DependencyProcessor to accomodate for the new multiple nature of this attribute. - Generalized the methodology used by ManyToManyDP to check for "did the other dependency already handle this direction", building on the `_reverse_property` collection. - post_update logic within dependency.py moves to use the same methodology as ManyToManyDP so that "did the other dependency do this already" checks are made to be specific to the two dependent instances. - Caught that RelationProperty.merge() was writing to instance.__dict__ directly (!) - repaired to talk to instance_state.dict. - Removed needless eager loading example from concrete mapper docs. - Added test for [ticket:965]. - Added the usual Node class/nodes table to orm/_fixtures.py, but haven't used it for anything yet. We can potentially update test/orm/query.py to use this fixture. - Other test/documentation cleanup.
* - fixed a bug in declarative test which was looking for old version of historyMike Bayer2008-08-191-1/+1
| | | | | | | | | | - Added "sorted_tables" accessor to MetaData, which returns Table objects sorted in order of dependency as a list. This deprecates the MetaData.table_iterator() method. The "reverse=False" keyword argument has also been removed from util.sort_tables(); use the Python 'reversed' function to reverse the results. [ticket:1033]
* - Removed 2.3 set emulations/enhancements.Jason Kirtland2008-07-151-1/+0
| | | | (sets.Set-based collections & DB-API returns still work.)
* - Quick cleanup of defaults.py. The main DefaultTest is still a mess.Jason Kirtland2008-05-201-60/+11
|
* Remove some noise from the uow testLele Gaifax2008-05-191-4/+4
|
* - Reworked test/orm/mapperJason Kirtland2008-05-131-0/+19
| | | | | - Exposed some uncovered (and broken) functionality - Fixed [ticket:1038]
* correcting dataload profiles for various testsMike Bayer2008-05-101-1/+1
|
* Test suite modernization in progress. Big changes:Jason Kirtland2008-05-091-0/+394
- @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