Skip to content

Commit 0155dbc

Browse files
Fix test imports and formatting
- Added missing 'from alembic import testing' import - Fixed decorator usage: @testing.fixture() and @testing.combinations() (was incorrectly using @Combinations.fixture() and @Combinations()) - Applied Black formatting (line wrapping for readability) - All syntax, import, and formatting checks now pass This resolves the AttributeError that was causing test failures.
1 parent f34ca67 commit 0155dbc

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

tests/test_mysql.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from alembic.autogenerate import compare
2626
from alembic.migration import MigrationContext
2727
from alembic.operations import ops
28+
from alembic import testing
2829
from alembic.testing import assert_raises_message
2930
from alembic.testing import combinations
3031
from alembic.testing import config
@@ -782,16 +783,32 @@ class MySQLEnumCompareTest(TestBase):
782783
__only_on__ = "mysql", "mariadb"
783784
__backend__ = True
784785

785-
@combinations.fixture()
786+
@testing.fixture()
786787
def connection(self):
787788
with config.db.begin() as conn:
788789
yield conn
789790

790-
@combinations(
791-
(Enum("A", "B", "C", native_enum=True), Enum("A", "B", "C", native_enum=True), False),
792-
(Enum("A", "B", "C", native_enum=True), Enum("A", "B", "C", "D", native_enum=True), True),
793-
(Enum("A", "B", "C", "D", native_enum=True), Enum("A", "B", "C", native_enum=True), True),
794-
(Enum("A", "B", "C", native_enum=True), Enum("C", "B", "A", native_enum=True), True),
791+
@testing.combinations(
792+
(
793+
Enum("A", "B", "C", native_enum=True),
794+
Enum("A", "B", "C", native_enum=True),
795+
False,
796+
),
797+
(
798+
Enum("A", "B", "C", native_enum=True),
799+
Enum("A", "B", "C", "D", native_enum=True),
800+
True,
801+
),
802+
(
803+
Enum("A", "B", "C", "D", native_enum=True),
804+
Enum("A", "B", "C", native_enum=True),
805+
True,
806+
),
807+
(
808+
Enum("A", "B", "C", native_enum=True),
809+
Enum("C", "B", "A", native_enum=True),
810+
True,
811+
),
795812
(MySQL_ENUM("A", "B", "C"), MySQL_ENUM("A", "B", "C"), False),
796813
(MySQL_ENUM("A", "B", "C"), MySQL_ENUM("A", "B", "C", "D"), True),
797814
id_="ssa",

0 commit comments

Comments
 (0)