diff options
Diffstat (limited to 'test/orm/inheritance/test_basic.py')
-rw-r--r-- | test/orm/inheritance/test_basic.py | 61 |
1 files changed, 45 insertions, 16 deletions
diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index d871a6a98..f2336980c 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -1,20 +1,48 @@ -import warnings -from sqlalchemy.testing import eq_, is_, assert_raises, assert_raises_message -from sqlalchemy import * -from sqlalchemy import exc as sa_exc, util, event -from sqlalchemy.orm import * -from sqlalchemy.orm.util import instance_str -from sqlalchemy.orm import exc as orm_exc, attributes -from sqlalchemy.testing.assertsql import AllOf, CompiledSQL, RegexSQL, Or -from sqlalchemy.sql import table, column +from sqlalchemy import Boolean +from sqlalchemy import case +from sqlalchemy import column +from sqlalchemy import event +from sqlalchemy import exc as sa_exc +from sqlalchemy import ForeignKey +from sqlalchemy import func +from sqlalchemy import inspect +from sqlalchemy import Integer +from sqlalchemy import MetaData +from sqlalchemy import select +from sqlalchemy import String +from sqlalchemy import table from sqlalchemy import testing +from sqlalchemy import util +from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy.orm import attributes +from sqlalchemy.orm import class_mapper +from sqlalchemy.orm import clear_mappers +from sqlalchemy.orm import column_property +from sqlalchemy.orm import composite +from sqlalchemy.orm import create_session +from sqlalchemy.orm import deferred +from sqlalchemy.orm import exc as orm_exc +from sqlalchemy.orm import joinedload +from sqlalchemy.orm import mapper +from sqlalchemy.orm import object_mapper +from sqlalchemy.orm import polymorphic_union +from sqlalchemy.orm import relationship +from sqlalchemy.orm import Session +from sqlalchemy.orm import sessionmaker +from sqlalchemy.orm import synonym +from sqlalchemy.orm.util import instance_str +from sqlalchemy.testing import assert_raises +from sqlalchemy.testing import assert_raises_message from sqlalchemy.testing import engines +from sqlalchemy.testing import eq_ from sqlalchemy.testing import fixtures -from test.orm import _fixtures -from sqlalchemy.testing.schema import Table, Column -from sqlalchemy import inspect -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.testing.util import gc_collect +from sqlalchemy.testing import is_ +from sqlalchemy.testing.assertsql import AllOf +from sqlalchemy.testing.assertsql import CompiledSQL +from sqlalchemy.testing.assertsql import Or +from sqlalchemy.testing.assertsql import RegexSQL +from sqlalchemy.testing.schema import Column +from sqlalchemy.testing.schema import Table class O2MTest(fixtures.MappedTest): @@ -1015,7 +1043,8 @@ class M2OUseGetTest(fixtures.MappedTest): # the 'primaryjoin' looks just like "Sub"'s "get" clause # (based on the Base id), and foreign_keys since that join # condition doesn't actually have any fks in it - # 'sub':relationship(Sub, primaryjoin=base.c.id==related.c.sub_id, + # 'sub':relationship(Sub, + # primaryjoin=base.c.id==related.c.sub_id, # foreign_keys=related.c.sub_id) # now we can use this: "sub": relationship(Sub) @@ -1984,7 +2013,7 @@ class DistinctPKTest(fixtures.MappedTest): r"On mapper Mapper\|Employee\|employees, " "primary key column 'persons.id' is being " "combined with distinct primary key column 'employees.eid' " - "in attribute 'id'. Use explicit properties to give " + "in attribute 'id'. Use explicit properties to give " "each column its own mapped attribute name.", self._do_test, True, |