summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_reflection.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-02-02 13:24:40 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2020-02-21 16:26:57 -0500
commit93b7767d00267ebe149cabcae7246b6796352eb8 (patch)
tree021f4960fccf4d6cc3cce17e680bdd6e8823d5c9 /test/dialect/postgresql/test_reflection.py
parent1e126829d594aa9f525c41942b2729bae9378fcd (diff)
downloadsqlalchemy-93b7767d00267ebe149cabcae7246b6796352eb8.tar.gz
Deprecate connection branching
The :meth:`.Connection.connect` method is deprecated as is the concept of "connection branching", which copies a :class:`.Connection` into a new one that has a no-op ".close()" method. This pattern is oriented around the "connectionless execution" concept which is also being removed in 2.0. As part of this change we begin to move the internals away from "connectionless execution" overall. Remove the "connectionless execution" concept from the reflection internals and replace with explicit patterns at the Inspector level. Fixes: #5131 Change-Id: Id23d28a9889212ac5ae7329b85136157815d3e6f
Diffstat (limited to 'test/dialect/postgresql/test_reflection.py')
-rw-r--r--test/dialect/postgresql/test_reflection.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/dialect/postgresql/test_reflection.py b/test/dialect/postgresql/test_reflection.py
index b410ca748..830a54eef 100644
--- a/test/dialect/postgresql/test_reflection.py
+++ b/test/dialect/postgresql/test_reflection.py
@@ -25,7 +25,6 @@ from sqlalchemy.dialects.postgresql import ExcludeConstraint
from sqlalchemy.dialects.postgresql import INTEGER
from sqlalchemy.dialects.postgresql import INTERVAL
from sqlalchemy.dialects.postgresql import TSRANGE
-from sqlalchemy.engine import reflection
from sqlalchemy.sql.schema import CheckConstraint
from sqlalchemy.testing import fixtures
from sqlalchemy.testing import mock
@@ -1199,7 +1198,7 @@ class ReflectionTest(fixtures.TestBase):
metadata=self.metadata,
)
enum_type.create(conn)
- inspector = reflection.Inspector.from_engine(conn.engine)
+ inspector = inspect(conn)
eq_(
inspector.get_enums("test_schema"),
[
@@ -1218,7 +1217,7 @@ class ReflectionTest(fixtures.TestBase):
"cat", "dog", "rat", name="pet", metadata=self.metadata
)
enum_type.create(testing.db)
- inspector = reflection.Inspector.from_engine(testing.db)
+ inspector = inspect(testing.db)
eq_(
inspector.get_enums(),
[
@@ -1356,7 +1355,7 @@ class ReflectionTest(fixtures.TestBase):
)
enum_type.create(testing.db)
schema_enum_type.create(testing.db)
- inspector = reflection.Inspector.from_engine(testing.db)
+ inspector = inspect(testing.db)
eq_(
inspector.get_enums(),
@@ -1392,7 +1391,7 @@ class ReflectionTest(fixtures.TestBase):
def test_inspect_enum_empty(self):
enum_type = postgresql.ENUM(name="empty", metadata=self.metadata)
enum_type.create(testing.db)
- inspector = reflection.Inspector.from_engine(testing.db)
+ inspector = inspect(testing.db)
eq_(
inspector.get_enums(),