summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.cfg2
-rw-r--r--tests/test_mysql.py4
-rw-r--r--tests/test_postgresql.py10
3 files changed, 8 insertions, 8 deletions
diff --git a/setup.cfg b/setup.cfg
index 316b252..e41b58f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -49,7 +49,7 @@ oracle8=oracle://scott:tiger@127.0.0.1:1521/?use_ansi=0
[tool:pytest]
-addopts= --tb native -v -r fxX -p no:warnings -p no:logging
+addopts= --tb native -v -r fxX -p no:warnings -p no:logging --maxfail=25
python_files=tests/test_*.py
diff --git a/tests/test_mysql.py b/tests/test_mysql.py
index f76831f..46d771b 100644
--- a/tests/test_mysql.py
+++ b/tests/test_mysql.py
@@ -2,12 +2,12 @@ from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import DATETIME
from sqlalchemy import func
+from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import Table
from sqlalchemy import text
from sqlalchemy import TIMESTAMP
-from sqlalchemy.engine.reflection import Inspector
from alembic import op
from alembic import util
@@ -556,7 +556,7 @@ class MySQLDefaultCompareTest(TestBase):
def _compare_default(self, t1, t2, col, rendered):
t1.create(self.bind)
- insp = Inspector.from_engine(self.bind)
+ insp = inspect(self.bind)
cols = insp.get_columns(t1.name)
refl = Table(t1.name, MetaData())
insp.reflecttable(refl, None)
diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py
index 92b7f16..cfa265e 100644
--- a/tests/test_postgresql.py
+++ b/tests/test_postgresql.py
@@ -5,6 +5,7 @@ from sqlalchemy import DateTime
from sqlalchemy import Float
from sqlalchemy import func
from sqlalchemy import Index
+from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import Interval
from sqlalchemy import MetaData
@@ -20,7 +21,6 @@ from sqlalchemy.dialects.postgresql import HSTORE
from sqlalchemy.dialects.postgresql import JSON
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.dialects.postgresql import UUID
-from sqlalchemy.engine.reflection import Inspector
from sqlalchemy.sql import column
from sqlalchemy.sql import false
from sqlalchemy.sql import table
@@ -523,7 +523,7 @@ class PostgresqlDefaultCompareTest(TestBase):
t1.create(self.bind)
- insp = Inspector.from_engine(self.bind)
+ insp = inspect(self.bind)
cols = insp.get_columns(t1.name)
insp_col = Column(
"somecol", cols[0]["type"], server_default=text(cols[0]["default"])
@@ -544,7 +544,7 @@ class PostgresqlDefaultCompareTest(TestBase):
def _compare_default(self, t1, t2, col, rendered):
t1.create(self.bind, checkfirst=True)
- insp = Inspector.from_engine(self.bind)
+ insp = inspect(self.bind)
cols = insp.get_columns(t1.name)
ctx = self.autogen_context.migration_context
@@ -703,7 +703,7 @@ class PostgresqlDetectSerialTest(TestBase):
seq._set_metadata(self.metadata)
self.metadata.create_all(config.db)
- insp = Inspector.from_engine(config.db)
+ insp = inspect(config.db)
uo = ops.UpgradeOps(ops=[])
_compare_tables(
@@ -719,7 +719,7 @@ class PostgresqlDetectSerialTest(TestBase):
c_expected,
)
- insp = Inspector.from_engine(config.db)
+ insp = inspect(config.db)
uo = ops.UpgradeOps(ops=[])
m2 = MetaData()
Table("t", m2, Column("x", BigInteger()))