diff options
Diffstat (limited to 'test/orm')
67 files changed, 302 insertions, 300 deletions
diff --git a/test/orm/_fixtures.py b/test/orm/_fixtures.py index e51924b77..c21833619 100644 --- a/test/orm/_fixtures.py +++ b/test/orm/_fixtures.py @@ -1,10 +1,10 @@ from sqlalchemy import MetaData, Integer, String, ForeignKey from sqlalchemy import util -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import attributes, mapper, relationship, \ backref, configure_mappers -from test.lib import fixtures +from sqlalchemy.testing import fixtures __all__ = () diff --git a/test/orm/inheritance/_poly_fixtures.py b/test/orm/inheritance/_poly_fixtures.py index 6c502f58d..55783cd69 100644 --- a/test/orm/inheritance/_poly_fixtures.py +++ b/test/orm/inheritance/_poly_fixtures.py @@ -6,9 +6,9 @@ from sqlalchemy.orm import interfaces, relationship, mapper, \ from sqlalchemy import exc as sa_exc from sqlalchemy.engine import default -from test.lib import AssertsCompiledSQL, fixtures, testing -from test.lib.schema import Table, Column -from test.lib.testing import assert_raises, eq_ +from sqlalchemy.testing import AssertsCompiledSQL, fixtures, testing +from sqlalchemy.testing.schema import Table, Column +from sqlalchemy.testing import assert_raises, eq_ class Company(fixtures.ComparableEntity): pass diff --git a/test/orm/inheritance/test_abc_inheritance.py b/test/orm/inheritance/test_abc_inheritance.py index 3a61adb18..757f8868e 100644 --- a/test/orm/inheritance/test_abc_inheritance.py +++ b/test/orm/inheritance/test_abc_inheritance.py @@ -2,9 +2,9 @@ from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.orm.interfaces import ONETOMANY, MANYTOONE -from test.lib import testing -from test.lib.schema import Table, Column -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing.schema import Table, Column +from sqlalchemy.testing import fixtures def produce_test(parent, child, direction): diff --git a/test/orm/inheritance/test_abc_polymorphic.py b/test/orm/inheritance/test_abc_polymorphic.py index 746bf0f13..f32805cc7 100644 --- a/test/orm/inheritance/test_abc_polymorphic.py +++ b/test/orm/inheritance/test_abc_polymorphic.py @@ -2,11 +2,11 @@ from sqlalchemy import * from sqlalchemy import util from sqlalchemy.orm import * -from test.lib.util import function_named -from test.lib import fixtures +from sqlalchemy.testing.util import function_named +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib.testing import eq_ -from test.lib.schema import Table, Column +from sqlalchemy.testing import eq_ +from sqlalchemy.testing.schema import Table, Column class ABCTest(fixtures.MappedTest): @classmethod diff --git a/test/orm/inheritance/test_assorted_poly.py b/test/orm/inheritance/test_assorted_poly.py index fe9fb493b..9c0ba989e 100644 --- a/test/orm/inheritance/test_assorted_poly.py +++ b/test/orm/inheritance/test_assorted_poly.py @@ -3,17 +3,17 @@ These are generally tests derived from specific user issues. """ -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ from sqlalchemy import * from sqlalchemy import util from sqlalchemy.orm import * from sqlalchemy.orm.interfaces import MANYTOONE -from test.lib import AssertsExecutionResults, testing -from test.lib.util import function_named -from test.lib import fixtures +from sqlalchemy.testing import AssertsExecutionResults, testing +from sqlalchemy.testing.util import function_named +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib.testing import eq_ -from test.lib.schema import Table, Column +from sqlalchemy.testing import eq_ +from sqlalchemy.testing.schema import Table, Column class AttrSettable(object): def __init__(self, **kwargs): diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index ad30ab44d..66991e922 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -1,18 +1,19 @@ import warnings -from test.lib.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message from sqlalchemy import * from sqlalchemy import exc as sa_exc, util, event from sqlalchemy.orm import * from sqlalchemy.orm import exc as orm_exc, attributes -from test.lib.assertsql import AllOf, CompiledSQL +from sqlalchemy.testing.assertsql import AllOf, CompiledSQL from sqlalchemy.sql import table, column -from test.lib import testing, engines -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing import engines +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy import inspect from sqlalchemy.ext.declarative import declarative_base -from test.lib.util import gc_collect +from sqlalchemy.testing.util import gc_collect class O2MTest(fixtures.MappedTest): """deals with inheritance and one-to-many relationships""" diff --git a/test/orm/inheritance/test_concrete.py b/test/orm/inheritance/test_concrete.py index d51efa62b..40c3ab31b 100644 --- a/test/orm/inheritance/test_concrete.py +++ b/test/orm/inheritance/test_concrete.py @@ -1,15 +1,15 @@ -from test.lib.testing import eq_, assert_raises, \ +from sqlalchemy.testing import eq_, assert_raises, \ assert_raises_message from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.orm import exc as orm_exc -from test.lib import * +from sqlalchemy.testing import * import sqlalchemy as sa -from test.lib import testing -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing import fixtures from sqlalchemy.orm import attributes -from test.lib.testing import eq_ -from test.lib.schema import Table, Column +from sqlalchemy.testing import eq_ +from sqlalchemy.testing.schema import Table, Column class Employee(object): diff --git a/test/orm/inheritance/test_magazine.py b/test/orm/inheritance/test_magazine.py index a1118aa86..ae5aa8c8d 100644 --- a/test/orm/inheritance/test_magazine.py +++ b/test/orm/inheritance/test_magazine.py @@ -1,10 +1,10 @@ from sqlalchemy import * from sqlalchemy.orm import * -from test.lib import testing -from test.lib.util import function_named -from test.lib import fixtures -from test.lib.schema import Table, Column +from sqlalchemy import testing +from sqlalchemy.testing.util import function_named +from sqlalchemy.testing import fixtures +from sqlalchemy.testing.schema import Table, Column class BaseObject(object): def __init__(self, *args, **kwargs): diff --git a/test/orm/inheritance/test_manytomany.py b/test/orm/inheritance/test_manytomany.py index 1d5d8b297..e4df5d133 100644 --- a/test/orm/inheritance/test_manytomany.py +++ b/test/orm/inheritance/test_manytomany.py @@ -1,9 +1,9 @@ -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ from sqlalchemy import * from sqlalchemy.orm import * -from test.lib import testing -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing import fixtures class InheritTest(fixtures.MappedTest): diff --git a/test/orm/inheritance/test_poly_linked_list.py b/test/orm/inheritance/test_poly_linked_list.py index f87662587..1915007de 100644 --- a/test/orm/inheritance/test_poly_linked_list.py +++ b/test/orm/inheritance/test_poly_linked_list.py @@ -1,9 +1,9 @@ from sqlalchemy import * from sqlalchemy.orm import * -from test.lib import fixtures -from test.lib import testing -from test.lib.schema import Table, Column +from sqlalchemy.testing import fixtures +from sqlalchemy import testing +from sqlalchemy.testing.schema import Table, Column class PolymorphicCircularTest(fixtures.MappedTest): diff --git a/test/orm/inheritance/test_poly_persistence.py b/test/orm/inheritance/test_poly_persistence.py index 5b5844b70..3450c133c 100644 --- a/test/orm/inheritance/test_poly_persistence.py +++ b/test/orm/inheritance/test_poly_persistence.py @@ -1,14 +1,14 @@ """tests basic polymorphic mapper loading/saving, minimal relationships""" -from test.lib.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.orm import exc as orm_exc from sqlalchemy import exc as sa_exc -from test.lib import Column, testing -from test.lib.util import function_named +from sqlalchemy.testing import Column, testing +from sqlalchemy.testing.util import function_named from test.orm import _fixtures -from test.lib import fixtures +from sqlalchemy.testing import fixtures class Person(fixtures.ComparableEntity): pass diff --git a/test/orm/inheritance/test_polymorphic_rel.py b/test/orm/inheritance/test_polymorphic_rel.py index 6d7bcb676..8bbde972d 100644 --- a/test/orm/inheritance/test_polymorphic_rel.py +++ b/test/orm/inheritance/test_polymorphic_rel.py @@ -4,8 +4,8 @@ from sqlalchemy.orm import interfaces, create_session, joinedload, joinedload_al class_mapper from sqlalchemy import exc as sa_exc -from test.lib import testing -from test.lib.testing import assert_raises, eq_ +from sqlalchemy import testing +from sqlalchemy.testing import assert_raises, eq_ from _poly_fixtures import Company, Person, Engineer, Manager, Boss, \ Machine, Paperwork, _Polymorphic,\ diff --git a/test/orm/inheritance/test_productspec.py b/test/orm/inheritance/test_productspec.py index d7c7eb24a..c1e99e338 100644 --- a/test/orm/inheritance/test_productspec.py +++ b/test/orm/inheritance/test_productspec.py @@ -2,9 +2,9 @@ from datetime import datetime from sqlalchemy import * from sqlalchemy.orm import * -from test.lib import testing -from test.lib import fixtures -from test.lib.schema import Table, Column +from sqlalchemy import testing +from sqlalchemy.testing import fixtures +from sqlalchemy.testing.schema import Table, Column class InheritTest(fixtures.MappedTest): """tests some various inheritance round trips involving a particular set of polymorphic inheritance relationships""" diff --git a/test/orm/inheritance/test_relationship.py b/test/orm/inheritance/test_relationship.py index a4e19b988..5511614c8 100644 --- a/test/orm/inheritance/test_relationship.py +++ b/test/orm/inheritance/test_relationship.py @@ -5,9 +5,9 @@ from sqlalchemy.orm import create_session, relationship, mapper, \ from sqlalchemy import Integer, String, ForeignKey from sqlalchemy.engine import default -from test.lib import AssertsCompiledSQL, fixtures, testing -from test.lib.schema import Table, Column -from test.lib.testing import assert_raises, eq_ +from sqlalchemy.testing import AssertsCompiledSQL, fixtures, testing +from sqlalchemy.testing.schema import Table, Column +from sqlalchemy.testing import assert_raises, eq_ class Company(fixtures.ComparableEntity): pass diff --git a/test/orm/inheritance/test_selects.py b/test/orm/inheritance/test_selects.py index 9758744ca..dd9c8c8b8 100644 --- a/test/orm/inheritance/test_selects.py +++ b/test/orm/inheritance/test_selects.py @@ -1,9 +1,9 @@ from sqlalchemy import * from sqlalchemy.orm import * -from test.lib import testing +from sqlalchemy import testing -from test.lib import fixtures +from sqlalchemy.testing import fixtures class InheritingSelectablesTest(fixtures.MappedTest): @classmethod diff --git a/test/orm/inheritance/test_single.py b/test/orm/inheritance/test_single.py index 774626c48..08a693b92 100644 --- a/test/orm/inheritance/test_single.py +++ b/test/orm/inheritance/test_single.py @@ -1,11 +1,11 @@ -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ from sqlalchemy import * from sqlalchemy.orm import * -from test.lib import testing +from sqlalchemy import testing from test.orm import _fixtures -from test.lib import fixtures -from test.lib.schema import Table, Column +from sqlalchemy.testing import fixtures +from sqlalchemy.testing.schema import Table, Column class SingleInheritanceTest(testing.AssertsCompiledSQL, fixtures.MappedTest): diff --git a/test/orm/inheritance/test_with_poly.py b/test/orm/inheritance/test_with_poly.py index dc0035b6a..cbf2c9651 100644 --- a/test/orm/inheritance/test_with_poly.py +++ b/test/orm/inheritance/test_with_poly.py @@ -6,9 +6,9 @@ from sqlalchemy.orm import interfaces, relationship, mapper, \ from sqlalchemy import exc as sa_exc from sqlalchemy.engine import default -from test.lib import AssertsCompiledSQL, fixtures, testing -from test.lib.schema import Table, Column -from test.lib.testing import assert_raises, eq_ +from sqlalchemy.testing import AssertsCompiledSQL, fixtures, testing +from sqlalchemy.testing.schema import Table, Column +from sqlalchemy.testing import assert_raises, eq_ from _poly_fixtures import Company, Person, Engineer, Manager, Boss, \ Machine, Paperwork, _PolymorphicFixtureBase, _Polymorphic,\ diff --git a/test/orm/test_association.py b/test/orm/test_association.py index 47d0b1ddc..376cfaa84 100644 --- a/test/orm/test_association.py +++ b/test/orm/test_association.py @@ -1,10 +1,10 @@ -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session -from test.lib import fixtures -from test.lib.testing import eq_ +from sqlalchemy.testing import fixtures +from sqlalchemy.testing import eq_ class AssociationTest(fixtures.MappedTest): diff --git a/test/orm/test_assorted_eager.py b/test/orm/test_assorted_eager.py index dded00256..a1c96bdfa 100644 --- a/test/orm/test_assorted_eager.py +++ b/test/orm/test_assorted_eager.py @@ -9,12 +9,12 @@ be cleaned up and modernized. import datetime import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, backref, create_session -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures class EagerTest(fixtures.MappedTest): diff --git a/test/orm/test_attributes.py b/test/orm/test_attributes.py index 7c0c9527a..ecdfef294 100644 --- a/test/orm/test_attributes.py +++ b/test/orm/test_attributes.py @@ -3,11 +3,11 @@ from sqlalchemy.orm import attributes, instrumentation, exc as orm_exc from sqlalchemy.orm.collections import collection from sqlalchemy.orm.interfaces import AttributeExtension from sqlalchemy import exc as sa_exc -from test.lib import * -from test.lib.testing import eq_, ne_, assert_raises, \ +from sqlalchemy.testing import * +from sqlalchemy.testing import eq_, ne_, assert_raises, \ assert_raises_message -from test.lib import fixtures -from test.lib.util import gc_collect, all_partial_orderings +from sqlalchemy.testing import fixtures +from sqlalchemy.testing.util import gc_collect, all_partial_orderings from sqlalchemy.util import jython from sqlalchemy import event diff --git a/test/orm/test_backref_mutations.py b/test/orm/test_backref_mutations.py index 7e425a457..925eedfa9 100644 --- a/test/orm/test_backref_mutations.py +++ b/test/orm/test_backref_mutations.py @@ -9,16 +9,16 @@ UPDATE in the database. """ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message from sqlalchemy import Integer, String, ForeignKey, Sequence, exc as sa_exc -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, relationship, create_session, \ class_mapper, backref, sessionmaker, Session from sqlalchemy.orm import attributes, exc as orm_exc -from test.lib import testing -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures class O2MCollectionTest(_fixtures.FixtureTest): diff --git a/test/orm/test_bind.py b/test/orm/test_bind.py index 00d9bb094..0d869130b 100644 --- a/test/orm/test_bind.py +++ b/test/orm/test_bind.py @@ -1,11 +1,11 @@ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message from sqlalchemy import MetaData, Integer -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, create_session import sqlalchemy as sa -from test.lib import testing -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing import fixtures class BindTest(fixtures.MappedTest): diff --git a/test/orm/test_cascade.py b/test/orm/test_cascade.py index ee3c7b63e..f681fc498 100644 --- a/test/orm/test_cascade.py +++ b/test/orm/test_cascade.py @@ -1,15 +1,15 @@ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message from sqlalchemy import Integer, String, ForeignKey, Sequence, \ exc as sa_exc -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session, \ sessionmaker, class_mapper, backref, Session, util as orm_util,\ configure_mappers from sqlalchemy.orm import attributes, exc as orm_exc -from test.lib import testing -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures class CascadeArgTest(fixtures.MappedTest): diff --git a/test/orm/test_collection.py b/test/orm/test_collection.py index b3de03aae..dc8aa2bc4 100644 --- a/test/orm/test_collection.py +++ b/test/orm/test_collection.py @@ -1,4 +1,4 @@ -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ import sys from operator import and_ @@ -6,14 +6,14 @@ import sqlalchemy.orm.collections as collections from sqlalchemy.orm.collections import collection import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, text -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy import util, exc as sa_exc from sqlalchemy.orm import create_session, mapper, relationship, \ attributes, instrumentation -from test.lib import fixtures -from test.lib.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing import fixtures +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message class Canary(sa.orm.interfaces.AttributeExtension): def __init__(self): @@ -1669,7 +1669,7 @@ class ColumnMappedWSerialize(fixtures.MappedTest): ]) def _run_test(self, specs): - from test.lib.util import picklers + from sqlalchemy.testing.util import picklers for spec, obj, expected in specs: coll = collections.column_mapped_collection(spec)() eq_( diff --git a/test/orm/test_compile.py b/test/orm/test_compile.py index 1b2714d70..d5823b7a6 100644 --- a/test/orm/test_compile.py +++ b/test/orm/test_compile.py @@ -1,9 +1,9 @@ from sqlalchemy import * from sqlalchemy import exc as sa_exc from sqlalchemy.orm import * -from test.lib import * -from test.lib.testing import assert_raises_message -from test.lib import fixtures +from sqlalchemy.testing import * +from sqlalchemy.testing import assert_raises_message +from sqlalchemy.testing import fixtures class CompileTest(fixtures.ORMTest): diff --git a/test/orm/test_composites.py b/test/orm/test_composites.py index 5e5775dc2..f9af0c702 100644 --- a/test/orm/test_composites.py +++ b/test/orm/test_composites.py @@ -1,17 +1,17 @@ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import MetaData, Integer, String, ForeignKey, func, \ util, select -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, backref, \ class_mapper, CompositeProperty, \ validates, aliased from sqlalchemy.orm import attributes, \ composite, relationship, \ Session -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures diff --git a/test/orm/test_cycles.py b/test/orm/test_cycles.py index dce8e04de..1da57b050 100644 --- a/test/orm/test_cycles.py +++ b/test/orm/test_cycles.py @@ -5,14 +5,14 @@ T1<->T2, with o2m or m2o between them, and a third T3 with o2m/m2o to one/both T1/T2. """ -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, backref, \ create_session, sessionmaker -from test.lib.testing import eq_ -from test.lib.assertsql import RegexSQL, ExactSQL, CompiledSQL, AllOf -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing.assertsql import RegexSQL, ExactSQL, CompiledSQL, AllOf +from sqlalchemy.testing import fixtures class SelfReferentialTest(fixtures.MappedTest): diff --git a/test/orm/test_default_strategies.py b/test/orm/test_default_strategies.py index 675cebda8..b986ac568 100644 --- a/test/orm/test_default_strategies.py +++ b/test/orm/test_default_strategies.py @@ -1,10 +1,10 @@ from test.orm import _fixtures -from test.lib import testing +from sqlalchemy import testing from sqlalchemy.orm import mapper, relationship, create_session from sqlalchemy import util from sqlalchemy.util import any import sqlalchemy as sa -from test.lib.testing import eq_, assert_raises_message +from sqlalchemy.testing import eq_, assert_raises_message class DefaultStrategyOptionsTest(_fixtures.FixtureTest): diff --git a/test/orm/test_defaults.py b/test/orm/test_defaults.py index a246cddae..2c4656e10 100644 --- a/test/orm/test_defaults.py +++ b/test/orm/test_defaults.py @@ -1,11 +1,10 @@ - import sqlalchemy as sa from sqlalchemy import Integer, String, ForeignKey, event -from test.lib import testing -from test.lib.schema import Table, Column +from sqlalchemy import testing +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session -from test.lib import fixtures -from test.lib.testing import eq_ +from sqlalchemy.testing import fixtures +from sqlalchemy.testing import eq_ class TriggerDefaultsTest(fixtures.MappedTest): diff --git a/test/orm/test_deprecations.py b/test/orm/test_deprecations.py index e6222d167..95fa9dd29 100644 --- a/test/orm/test_deprecations.py +++ b/test/orm/test_deprecations.py @@ -5,12 +5,12 @@ modern (i.e. not deprecated) alternative to them. The tests snippets here can be migrated directly to the wiki, docs, etc. """ -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, func -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, relationship, relation, create_session, sessionmaker -from test.lib import fixtures +from sqlalchemy.testing import fixtures class QueryAlternativesTest(fixtures.MappedTest): diff --git a/test/orm/test_descriptor.py b/test/orm/test_descriptor.py index b8b876794..2134d87b2 100644 --- a/test/orm/test_descriptor.py +++ b/test/orm/test_descriptor.py @@ -5,8 +5,8 @@ from sqlalchemy.sql import column from sqlalchemy import Column, Integer, func, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.util import partial -from test.lib import fixtures -from test.lib.testing import eq_ +from sqlalchemy.testing import fixtures +from sqlalchemy.testing import eq_ class TestDescriptor(descriptor_props.DescriptorProperty): def __init__(self, cls, key, descriptor=None, doc=None, diff --git a/test/orm/test_dynamic.py b/test/orm/test_dynamic.py index fd8793778..3c4ad4b11 100644 --- a/test/orm/test_dynamic.py +++ b/test/orm/test_dynamic.py @@ -1,13 +1,13 @@ -from test.lib.testing import eq_, ne_ +from sqlalchemy.testing import eq_, ne_ import operator from sqlalchemy.orm import dynamic_loader, backref, configure_mappers -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, desc, select, func, exc -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session, Query, attributes, exc as orm_exc from sqlalchemy.orm.dynamic import AppenderMixin -from test.lib.testing import eq_, AssertsCompiledSQL, assert_raises_message, assert_raises -from test.lib import fixtures +from sqlalchemy.testing import eq_, AssertsCompiledSQL, assert_raises_message, assert_raises +from sqlalchemy.testing import fixtures from test.orm import _fixtures diff --git a/test/orm/test_eager_relations.py b/test/orm/test_eager_relations.py index 4ef55293b..664ddb8e3 100644 --- a/test/orm/test_eager_relations.py +++ b/test/orm/test_eager_relations.py @@ -1,20 +1,20 @@ """tests of joined-eager loaded attributes""" -from test.lib.testing import eq_, is_, is_not_ +from sqlalchemy.testing import eq_, is_, is_not_ import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy.orm import joinedload, deferred, undefer, \ joinedload_all, backref, eagerload, Session, immediateload from sqlalchemy import Integer, String, Date, ForeignKey, and_, select, \ func -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session, \ lazyload, aliased, column_property from sqlalchemy.sql import operators -from test.lib.testing import eq_, assert_raises, \ +from sqlalchemy.testing import eq_, assert_raises, \ assert_raises_message -from test.lib.assertsql import CompiledSQL -from test.lib import fixtures +from sqlalchemy.testing.assertsql import CompiledSQL +from sqlalchemy.testing import fixtures from test.orm import _fixtures from sqlalchemy.util import OrderedDict as odict import datetime diff --git a/test/orm/test_evaluator.py b/test/orm/test_evaluator.py index f632561f1..4678100eb 100644 --- a/test/orm/test_evaluator.py +++ b/test/orm/test_evaluator.py @@ -1,12 +1,12 @@ """Evluating SQL expressions on ORM objects""" import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import String, Integer, select -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, create_session -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from sqlalchemy import and_, or_, not_ from sqlalchemy.orm import evaluator diff --git a/test/orm/test_events.py b/test/orm/test_events.py index e49a4a6a7..d8bef66d3 100644 --- a/test/orm/test_events.py +++ b/test/orm/test_events.py @@ -1,15 +1,15 @@ -from test.lib.testing import assert_raises_message, assert_raises +from sqlalchemy.testing import assert_raises_message, assert_raises import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, \ create_session, class_mapper, \ Mapper, column_property, \ Session, sessionmaker, attributes from sqlalchemy.orm.instrumentation import ClassManager -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures from sqlalchemy import event diff --git a/test/orm/test_expire.py b/test/orm/test_expire.py index 16ca8b0ba..0b1350e0a 100644 --- a/test/orm/test_expire.py +++ b/test/orm/test_expire.py @@ -1,16 +1,16 @@ """Attribute/instance expiration, deferral of attributes, etc.""" -from test.lib.testing import eq_, assert_raises, assert_raises_message -from test.lib.util import gc_collect +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing.util import gc_collect import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, exc as sa_exc -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, relationship, create_session, \ attributes, deferred, exc as orm_exc, defer, undefer,\ strategies, state, lazyload, backref, Session -from test.lib import fixtures +from sqlalchemy.testing import fixtures from test.orm import _fixtures diff --git a/test/orm/test_froms.py b/test/orm/test_froms.py index f70f08470..05a017bb9 100644 --- a/test/orm/test_froms.py +++ b/test/orm/test_froms.py @@ -1,4 +1,4 @@ -from test.lib.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import * from sqlalchemy import exc as sa_exc, util @@ -7,14 +7,15 @@ from sqlalchemy.engine import default from sqlalchemy.orm import * from sqlalchemy.orm import attributes -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ import sqlalchemy as sa -from test.lib import testing, AssertsCompiledSQL, Column, engines +from sqlalchemy import testing +from sqlalchemy.testing import AssertsCompiledSQL, Column, engines from test.orm import _fixtures -from test.lib import fixtures +from sqlalchemy.testing import fixtures from sqlalchemy.orm.util import join, outerjoin, with_parent diff --git a/test/orm/test_generative.py b/test/orm/test_generative.py index de3de3d63..3f5da69c3 100644 --- a/test/orm/test_generative.py +++ b/test/orm/test_generative.py @@ -1,12 +1,12 @@ -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, MetaData, func -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, relationship, create_session -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures diff --git a/test/orm/test_hasparent.py b/test/orm/test_hasparent.py index b9d1cb15a..fd246b527 100644 --- a/test/orm/test_hasparent.py +++ b/test/orm/test_hasparent.py @@ -1,18 +1,18 @@ """test the current state of the hasparent() flag.""" -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message from sqlalchemy import Integer, String, ForeignKey, Sequence, \ exc as sa_exc -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session, \ sessionmaker, class_mapper, backref, Session from sqlalchemy.orm import attributes, exc as orm_exc -from test.lib import testing -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib.util import gc_collect +from sqlalchemy.testing.util import gc_collect class ParentRemovalTest(fixtures.MappedTest): diff --git a/test/orm/test_immediate_load.py b/test/orm/test_immediate_load.py index e809ebfe6..38dec75bd 100644 --- a/test/orm/test_immediate_load.py +++ b/test/orm/test_immediate_load.py @@ -1,8 +1,8 @@ """basic tests of lazy loaded attributes""" -from test.lib import testing +from sqlalchemy import testing from sqlalchemy.orm import mapper, relationship, create_session, immediateload -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ from test.orm import _fixtures diff --git a/test/orm/test_inspect.py b/test/orm/test_inspect.py index bd43e43d6..f504ad16e 100644 --- a/test/orm/test_inspect.py +++ b/test/orm/test_inspect.py @@ -1,12 +1,12 @@ """test the inspection registry system.""" -from test.lib.testing import eq_, assert_raises_message, is_ +from sqlalchemy.testing import eq_, assert_raises_message, is_ from sqlalchemy import exc, util from sqlalchemy import inspect from test.orm import _fixtures from sqlalchemy.orm import class_mapper, synonym, Session, aliased from sqlalchemy.orm.attributes import instance_state, NO_VALUE -from test.lib import testing +from sqlalchemy import testing class TestORMInspection(_fixtures.FixtureTest): @classmethod diff --git a/test/orm/test_instrumentation.py b/test/orm/test_instrumentation.py index d2388856f..01b678fac 100644 --- a/test/orm/test_instrumentation.py +++ b/test/orm/test_instrumentation.py @@ -1,13 +1,13 @@ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message import sqlalchemy as sa from sqlalchemy import MetaData, Integer, ForeignKey, util, event from sqlalchemy.orm import mapper, relationship, create_session, \ attributes, class_mapper, clear_mappers, instrumentation, events -from test.lib.schema import Table -from test.lib.schema import Column -from test.lib.testing import eq_, ne_ -from test.lib import fixtures, testing +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column +from sqlalchemy.testing import eq_, ne_ +from sqlalchemy.testing import fixtures, testing class InitTest(fixtures.ORMTest): diff --git a/test/orm/test_joins.py b/test/orm/test_joins.py index 086897186..358c3ae8d 100644 --- a/test/orm/test_joins.py +++ b/test/orm/test_joins.py @@ -1,4 +1,4 @@ -from test.lib.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import * from sqlalchemy import exc as sa_exc, util @@ -7,14 +7,14 @@ from sqlalchemy.engine import default from sqlalchemy.orm import * from sqlalchemy.orm import attributes -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ import sqlalchemy as sa -from test.lib import testing, AssertsCompiledSQL, Column, engines - +from sqlalchemy import testing +from sqlalchemy.testing import AssertsCompiledSQL, Column, engines from test.orm import _fixtures -from test.lib import fixtures +from sqlalchemy.testing import fixtures from sqlalchemy.orm.util import join, outerjoin, with_parent diff --git a/test/orm/test_lazy_relations.py b/test/orm/test_lazy_relations.py index 297d027f5..66b1eb5e4 100644 --- a/test/orm/test_lazy_relations.py +++ b/test/orm/test_lazy_relations.py @@ -1,18 +1,18 @@ """basic tests of lazy loaded attributes""" -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message import datetime from sqlalchemy import exc as sa_exc from sqlalchemy.orm import attributes, exc as orm_exc import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, SmallInteger from sqlalchemy.types import TypeDecorator -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, relationship, create_session -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures diff --git a/test/orm/test_load_on_fks.py b/test/orm/test_load_on_fks.py index 05b78ccb8..813d8d17a 100644 --- a/test/orm/test_load_on_fks.py +++ b/test/orm/test_load_on_fks.py @@ -2,12 +2,12 @@ from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base -from test.lib.testing import eq_, AssertsExecutionResults, assert_raises -from test.lib import testing -from test.lib import fixtures +from sqlalchemy.testing import eq_, AssertsExecutionResults, assert_raises +from sqlalchemy import testing +from sqlalchemy.testing import fixtures from sqlalchemy.orm.attributes import instance_state from sqlalchemy.orm.exc import FlushError -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column engine = testing.db diff --git a/test/orm/test_lockmode.py b/test/orm/test_lockmode.py index b2bc60865..0fe82f394 100644 --- a/test/orm/test_lockmode.py +++ b/test/orm/test_lockmode.py @@ -2,8 +2,8 @@ from sqlalchemy.engine import default from sqlalchemy.databases import * from sqlalchemy.orm import mapper from sqlalchemy.orm import Session -from test.lib import AssertsCompiledSQL -from test.lib.testing import assert_raises_message +from sqlalchemy.testing import AssertsCompiledSQL +from sqlalchemy.testing import assert_raises_message from test.orm import _fixtures diff --git a/test/orm/test_manytomany.py b/test/orm/test_manytomany.py index ed9075833..ca9c3c095 100644 --- a/test/orm/test_manytomany.py +++ b/test/orm/test_manytomany.py @@ -1,13 +1,13 @@ -from test.lib.testing import assert_raises, \ +from sqlalchemy.testing import assert_raises, \ assert_raises_message, eq_ import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, relationship, create_session, \ exc as orm_exc, sessionmaker -from test.lib import fixtures +from sqlalchemy.testing import fixtures class M2MTest(fixtures.MappedTest): diff --git a/test/orm/test_mapper.py b/test/orm/test_mapper.py index 487ec066f..b2e36b273 100644 --- a/test/orm/test_mapper.py +++ b/test/orm/test_mapper.py @@ -1,10 +1,10 @@ """General mapper operations with an emphasis on selecting/loading.""" -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import MetaData, Integer, String, ForeignKey, func, util -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.engine import default from sqlalchemy.orm import mapper, relationship, backref, \ create_session, class_mapper, configure_mappers, reconstructor, \ @@ -12,10 +12,10 @@ from sqlalchemy.orm import mapper, relationship, backref, \ column_property, composite, dynamic_loader, \ comparable_property, Session from sqlalchemy.orm.persistence import _sort_states -from test.lib.testing import eq_, AssertsCompiledSQL, is_ -from test.lib import fixtures +from sqlalchemy.testing import eq_, AssertsCompiledSQL, is_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib.assertsql import CompiledSQL +from sqlalchemy.testing.assertsql import CompiledSQL import logging class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL): diff --git a/test/orm/test_merge.py b/test/orm/test_merge.py index 47203b874..e1474f39b 100644 --- a/test/orm/test_merge.py +++ b/test/orm/test_merge.py @@ -1,19 +1,19 @@ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message import sqlalchemy as sa from sqlalchemy import Integer, PickleType, String, ForeignKey import operator -from test.lib import testing +from sqlalchemy import testing from sqlalchemy.util import OrderedSet from sqlalchemy.orm import mapper, relationship, create_session, \ PropComparator, synonym, comparable_property, sessionmaker, \ attributes, Session, backref, configure_mappers from sqlalchemy.orm.collections import attribute_mapped_collection from sqlalchemy.orm.interfaces import MapperOption -from test.lib.testing import eq_, ne_ -from test.lib import fixtures +from sqlalchemy.testing import eq_, ne_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures from sqlalchemy import event, and_, case -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column class MergeTest(_fixtures.FixtureTest): """Session.merge() functionality""" diff --git a/test/orm/test_naturalpks.py b/test/orm/test_naturalpks.py index 0592b1e10..9ad54fd10 100644 --- a/test/orm/test_naturalpks.py +++ b/test/orm/test_naturalpks.py @@ -3,16 +3,16 @@ Primary key changing capabilities and passive/non-passive cascading updates. """ from __future__ import with_statement -from test.lib.testing import eq_, ne_, \ +from sqlalchemy.testing import eq_, ne_, \ assert_raises, assert_raises_message import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, Unicode -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session, backref, Session from sqlalchemy.orm.session import make_transient -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures class NaturalPKTest(fixtures.MappedTest): @@ -965,7 +965,7 @@ class CascadeToFKPKTest(fixtures.MappedTest, testing.AssertsCompiledSQL): sess.add(u2) sess.add(a2) - from test.lib.assertsql import CompiledSQL + from sqlalchemy.testing.assertsql import CompiledSQL # test that the primary key columns of addresses are not # being updated as well, since this is a row switch. diff --git a/test/orm/test_of_type.py b/test/orm/test_of_type.py index 40d553fe8..28bcc6e81 100644 --- a/test/orm/test_of_type.py +++ b/test/orm/test_of_type.py @@ -2,11 +2,12 @@ from sqlalchemy.orm import Session, aliased, with_polymorphic, \ contains_eager, joinedload, subqueryload, relationship,\ subqueryload_all, joinedload_all from sqlalchemy import and_ -from test.lib import testing, fixtures -from test.lib.testing import assert_raises, eq_ -from test.lib.schema import Column +from sqlalchemy import testing +from sqlalchemy.testing import fixtures +from sqlalchemy.testing import assert_raises, eq_ +from sqlalchemy.testing.schema import Column from sqlalchemy.engine import default -from test.lib.entities import ComparableEntity +from sqlalchemy.testing.entities import ComparableEntity from sqlalchemy import Integer, String, ForeignKey from .inheritance._poly_fixtures import Company, Person, Engineer, Manager, Boss, \ Machine, Paperwork, _PolymorphicFixtureBase, _Polymorphic,\ diff --git a/test/orm/test_onetoone.py b/test/orm/test_onetoone.py index 09dc379b8..19b13c4dd 100644 --- a/test/orm/test_onetoone.py +++ b/test/orm/test_onetoone.py @@ -1,9 +1,9 @@ import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session -from test.lib import fixtures +from sqlalchemy.testing import fixtures class O2OTest(fixtures.MappedTest): diff --git a/test/orm/test_pickled.py b/test/orm/test_pickled.py index 88867edcb..d70d36b59 100644 --- a/test/orm/test_pickled.py +++ b/test/orm/test_pickled.py @@ -1,11 +1,11 @@ -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ from sqlalchemy.util import pickle import sqlalchemy as sa -from test.lib import testing -from test.lib.util import picklers -from test.lib.testing import assert_raises_message +from sqlalchemy import testing +from sqlalchemy.testing.util import picklers +from sqlalchemy.testing import assert_raises_message from sqlalchemy import Integer, String, ForeignKey, exc, MetaData -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, create_session, \ sessionmaker, attributes, interfaces,\ clear_mappers, exc as orm_exc,\ @@ -13,9 +13,9 @@ from sqlalchemy.orm import mapper, relationship, create_session, \ lazyload, aliased from sqlalchemy.orm.collections import attribute_mapped_collection, \ column_mapped_collection -from test.lib import fixtures +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib.pickleable import User, Address, Dingaling, Order, \ +from sqlalchemy.testing.pickleable import User, Address, Dingaling, Order, \ Child1, Child2, Parent, Screen, EmailUser @@ -87,7 +87,7 @@ class PickleTest(fixtures.MappedTest): assert_raises_message( orm_exc.UnmappedInstanceError, - "Cannot deserialize object of type <class 'test.lib.pickleable.User'> - no mapper()", + "Cannot deserialize object of type <class 'sqlalchemy.testing.pickleable.User'> - no mapper()", pickle.loads, u1_pickled) def test_no_instrumentation(self): diff --git a/test/orm/test_query.py b/test/orm/test_query.py index 38739afff..56275a735 100644 --- a/test/orm/test_query.py +++ b/test/orm/test_query.py @@ -1,4 +1,3 @@ -from test.lib.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import MetaData, null, exists, text, union, literal, \ literal_column, func, between, Unicode, desc, and_, bindparam, \ @@ -11,14 +10,14 @@ from sqlalchemy.orm import attributes, mapper, relationship, backref, \ configure_mappers, create_session, synonym, Session, class_mapper, \ aliased, column_property, joinedload_all, joinedload, Query,\ util as orm_util -from test.lib.assertsql import CompiledSQL -from test.lib.testing import eq_ -from test.lib.schema import Table, Column - +from sqlalchemy.testing.assertsql import CompiledSQL +from sqlalchemy.testing.schema import Table, Column import sqlalchemy as sa -from test.lib import testing, AssertsCompiledSQL, engines +from sqlalchemy import testing +from sqlalchemy.testing.assertions import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing import AssertsCompiledSQL from test.orm import _fixtures -from test.lib import fixtures +from sqlalchemy.testing import fixtures, engines from sqlalchemy.orm.util import join, outerjoin, with_parent diff --git a/test/orm/test_rel_fn.py b/test/orm/test_rel_fn.py index f5fa1d4c9..f23d40be7 100644 --- a/test/orm/test_rel_fn.py +++ b/test/orm/test_rel_fn.py @@ -1,6 +1,6 @@ -from test.lib.testing import assert_raises, assert_raises_message, eq_, \ +from sqlalchemy.testing import assert_raises, assert_raises_message, eq_, \ AssertsCompiledSQL, is_ -from test.lib import fixtures +from sqlalchemy.testing import fixtures from sqlalchemy.orm import relationships, foreign, remote, remote_foreign from sqlalchemy import MetaData, Table, Column, ForeignKey, Integer, \ select, ForeignKeyConstraint, exc, func, and_ diff --git a/test/orm/test_relationships.py b/test/orm/test_relationships.py index 394a1fe7a..a2a81d0ee 100644 --- a/test/orm/test_relationships.py +++ b/test/orm/test_relationships.py @@ -1,17 +1,17 @@ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message import datetime import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, MetaData, and_ -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, relation, \ backref, create_session, configure_mappers, \ clear_mappers, sessionmaker, attributes,\ Session, composite, column_property, foreign,\ remote from sqlalchemy.orm.interfaces import ONETOMANY, MANYTOONE, MANYTOMANY -from test.lib.testing import eq_, startswith_, AssertsCompiledSQL, is_ -from test.lib import fixtures +from sqlalchemy.testing import eq_, startswith_, AssertsCompiledSQL, is_ +from sqlalchemy.testing import fixtures from test.orm import _fixtures from sqlalchemy import exc diff --git a/test/orm/test_scoping.py b/test/orm/test_scoping.py index 978a8bc1d..87557a162 100644 --- a/test/orm/test_scoping.py +++ b/test/orm/test_scoping.py @@ -1,12 +1,12 @@ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy.orm import scoped_session from sqlalchemy import Integer, String, ForeignKey -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, query -from test.lib.testing import eq_ -from test.lib import fixtures +from sqlalchemy.testing import eq_ +from sqlalchemy.testing import fixtures diff --git a/test/orm/test_selectable.py b/test/orm/test_selectable.py index 1a46e3b6d..42347213e 100644 --- a/test/orm/test_selectable.py +++ b/test/orm/test_selectable.py @@ -1,12 +1,12 @@ """Generic mapping to Select statements""" -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message import sqlalchemy as sa -from test.lib import testing +from sqlalchemy import testing from sqlalchemy import String, Integer, select -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, Session -from test.lib.testing import eq_, AssertsCompiledSQL -from test.lib import fixtures +from sqlalchemy.testing import eq_, AssertsCompiledSQL +from sqlalchemy.testing import fixtures diff --git a/test/orm/test_session.py b/test/orm/test_session.py index 28293675d..61fed6d18 100644 --- a/test/orm/test_session.py +++ b/test/orm/test_session.py @@ -1,20 +1,20 @@ -from test.lib.testing import eq_, assert_raises, \ +from sqlalchemy.testing import eq_, assert_raises, \ assert_raises_message, assert_warnings -from test.lib.util import gc_collect -from test.lib import pickleable +from sqlalchemy.testing.util import gc_collect +from sqlalchemy.testing import pickleable from sqlalchemy.util import pickle import inspect from sqlalchemy.orm import create_session, sessionmaker, attributes, \ make_transient, Session import sqlalchemy as sa -from test.lib import engines, testing, config +from sqlalchemy.testing import engines, testing, config from sqlalchemy import Integer, String, Sequence -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, backref, joinedload, \ exc as orm_exc, object_session from sqlalchemy.util import pypy -from test.lib import fixtures -from test.lib import fixtures +from sqlalchemy.testing import fixtures +from sqlalchemy.testing import fixtures from test.orm import _fixtures class SessionTest(_fixtures.FixtureTest): diff --git a/test/orm/test_subquery_relations.py b/test/orm/test_subquery_relations.py index 8d7c89044..f6e2299b4 100644 --- a/test/orm/test_subquery_relations.py +++ b/test/orm/test_subquery_relations.py @@ -1,15 +1,15 @@ -from test.lib.testing import eq_, is_, is_not_ -from test.lib import testing -from test.lib.schema import Table, Column +from sqlalchemy.testing import eq_, is_, is_not_ +from sqlalchemy import testing +from sqlalchemy.testing.schema import Table, Column from sqlalchemy import Integer, String, ForeignKey, bindparam, inspect from sqlalchemy.orm import backref, subqueryload, subqueryload_all, \ mapper, relationship, clear_mappers, create_session, lazyload, \ aliased, joinedload, deferred, undefer, eagerload_all,\ Session -from test.lib.testing import eq_, assert_raises, \ +from sqlalchemy.testing import eq_, assert_raises, \ assert_raises_message -from test.lib.assertsql import CompiledSQL -from test.lib import fixtures +from sqlalchemy.testing.assertsql import CompiledSQL +from sqlalchemy.testing import fixtures from test.orm import _fixtures import sqlalchemy as sa diff --git a/test/orm/test_sync.py b/test/orm/test_sync.py index 9134e47ce..a2c894725 100644 --- a/test/orm/test_sync.py +++ b/test/orm/test_sync.py @@ -1,8 +1,8 @@ -from test.lib.testing import eq_, assert_raises, assert_raises_message -from test.lib import testing -from test.lib.schema import Table, Column +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy import testing +from sqlalchemy.testing.schema import Table, Column from test.orm import _fixtures -from test.lib import fixtures +from sqlalchemy.testing import fixtures from sqlalchemy import Integer, String, ForeignKey, func from sqlalchemy.orm import mapper, relationship, backref, \ create_session, unitofwork, attributes,\ diff --git a/test/orm/test_transaction.py b/test/orm/test_transaction.py index fdbf6ae1f..d2b8b8b85 100644 --- a/test/orm/test_transaction.py +++ b/test/orm/test_transaction.py @@ -1,15 +1,15 @@ -from test.lib.testing import eq_, assert_raises, \ +from sqlalchemy.testing import eq_, assert_raises, \ assert_raises_message, assert_warnings from sqlalchemy import * from sqlalchemy.orm import attributes from sqlalchemy import exc as sa_exc, event from sqlalchemy.orm import exc as orm_exc from sqlalchemy.orm import * -from test.lib.util import gc_collect -from test.lib import testing -from test.lib import fixtures -from test.lib import engines +from sqlalchemy.testing.util import gc_collect +from sqlalchemy import testing +from sqlalchemy.testing import fixtures +from sqlalchemy.testing import engines from test.orm._fixtures import FixtureTest diff --git a/test/orm/test_unitofwork.py b/test/orm/test_unitofwork.py index 9691c38a6..8f354b083 100644 --- a/test/orm/test_unitofwork.py +++ b/test/orm/test_unitofwork.py @@ -1,25 +1,25 @@ # coding: utf-8 """Tests unitofwork operations.""" -from test.lib.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import datetime import operator from sqlalchemy.orm import mapper as orm_mapper import sqlalchemy as sa from sqlalchemy import Integer, String, ForeignKey, literal_column, event -from test.lib import engines, testing, pickleable -from test.lib.schema import Table -from test.lib.schema import Column +from sqlalchemy.testing import engines, testing, pickleable +from sqlalchemy.testing.schema import Table +from sqlalchemy.testing.schema import Column from sqlalchemy.orm import mapper, relationship, create_session, \ column_property, attributes, Session, reconstructor, object_session,\ exc as orm_exc -from test.lib.testing import eq_, ne_ -from test.lib.util import gc_collect -from test.lib import fixtures +from sqlalchemy.testing import eq_, ne_ +from sqlalchemy.testing.util import gc_collect +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib import fixtures -from test.lib.assertsql import AllOf, CompiledSQL +from sqlalchemy.testing import fixtures +from sqlalchemy.testing.assertsql import AllOf, CompiledSQL import gc class UnitOfWorkTest(object): diff --git a/test/orm/test_unitofworkv2.py b/test/orm/test_unitofworkv2.py index 860fffdf5..7c7337c62 100644 --- a/test/orm/test_unitofworkv2.py +++ b/test/orm/test_unitofworkv2.py @@ -1,14 +1,15 @@ -from test.lib.testing import eq_, assert_raises, assert_raises_message -from test.lib import testing, engines -from test.lib.schema import Table, Column +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy import testing +from sqlalchemy.testing import engines +from sqlalchemy.testing.schema import Table, Column from test.orm import _fixtures -from test.lib import fixtures +from sqlalchemy.testing import fixtures from sqlalchemy import Integer, String, ForeignKey, func from sqlalchemy.orm import mapper, relationship, backref, \ create_session, unitofwork, attributes,\ Session, class_mapper, sync, exc as orm_exc -from test.lib.assertsql import AllOf, CompiledSQL +from sqlalchemy.testing.assertsql import AllOf, CompiledSQL class AssertsUOW(object): def _get_test_uow(self, session): diff --git a/test/orm/test_update_delete.py b/test/orm/test_update_delete.py index e259c5229..85b880710 100644 --- a/test/orm/test_update_delete.py +++ b/test/orm/test_update_delete.py @@ -1,9 +1,9 @@ -from test.lib.testing import eq_, assert_raises, assert_raises_message -from test.lib import fixtures, testing +from sqlalchemy.testing import eq_, assert_raises, assert_raises_message +from sqlalchemy.testing import fixtures, testing from sqlalchemy import Integer, String, ForeignKey, or_, and_, exc, select, func from sqlalchemy.orm import mapper, relationship, backref, Session, joinedload -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column diff --git a/test/orm/test_utils.py b/test/orm/test_utils.py index 617f1d538..00fbe7771 100644 --- a/test/orm/test_utils.py +++ b/test/orm/test_utils.py @@ -1,4 +1,4 @@ -from test.lib.testing import assert_raises, assert_raises_message +from sqlalchemy.testing import assert_raises, assert_raises_message from sqlalchemy.orm import interfaces, util from sqlalchemy import Column from sqlalchemy import Integer @@ -6,10 +6,10 @@ from sqlalchemy import MetaData from sqlalchemy import Table from sqlalchemy.orm import aliased from sqlalchemy.orm import mapper, create_session -from test.lib import testing -from test.lib import fixtures +from sqlalchemy import testing +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib.testing import eq_ +from sqlalchemy.testing import eq_ class AliasedClassTest(fixtures.TestBase): diff --git a/test/orm/test_versioning.py b/test/orm/test_versioning.py index 0faeb133d..aa1e99602 100644 --- a/test/orm/test_versioning.py +++ b/test/orm/test_versioning.py @@ -1,16 +1,16 @@ import datetime import sqlalchemy as sa -from test.lib import engines, testing +from sqlalchemy.testing import engines, testing from sqlalchemy import Integer, String, Date, ForeignKey, literal_column, \ orm, exc, select, TypeDecorator -from test.lib.schema import Table, Column +from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, Session, \ create_session, column_property, sessionmaker,\ exc as orm_exc -from test.lib.testing import eq_, ne_, assert_raises, assert_raises_message -from test.lib import fixtures +from sqlalchemy.testing import eq_, ne_, assert_raises, assert_raises_message +from sqlalchemy.testing import fixtures from test.orm import _fixtures -from test.lib import fixtures +from sqlalchemy.testing import fixtures _uuids = [ |