Skip to content

Commit abef1d8

Browse files
committed
remove DB-based skips on non-backend tests
for tests that are testing for SQL compilation only, there's no need to limit based on DB backend since we aren't using it. this avoids the awkward situation where tests like test_sqlite.py -> test_create_table_with_comment_ignored would be skipped when running the test suite against sqlite, but would run just fine when running against any other DB (because those DBs dont have a comment limitation and the test is just a compilation test). Change-Id: Iecd482e8c1034b28649ce5390dac0d0ddea83790
1 parent 35e1cdd commit abef1d8

File tree

5 files changed

+0
-20
lines changed

5 files changed

+0
-20
lines changed

tests/test_mssql.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from alembic import util
2424
from alembic.testing import assert_raises_message
2525
from alembic.testing import combinations
26-
from alembic.testing import config
2726
from alembic.testing import eq_
2827
from alembic.testing import expect_warnings
2928
from alembic.testing import fixture
@@ -470,7 +469,6 @@ def test_create_index_mssql_include_is_none(self):
470469
lambda: Computed("foo * 5"),
471470
),
472471
)
473-
@config.requirements.computed_columns
474472
def test_alter_column_computed_not_supported(self, sd, esd):
475473
op_fixture("mssql")
476474
assert_raises_message(
@@ -485,7 +483,6 @@ def test_alter_column_computed_not_supported(self, sd, esd):
485483
existing_server_default=esd(),
486484
)
487485

488-
@config.requirements.identity_columns
489486
@combinations(
490487
({},),
491488
(dict(always=True),),
@@ -518,7 +515,6 @@ def test_add_column_identity(self, kw):
518515
lambda: Identity(),
519516
),
520517
)
521-
@config.requirements.identity_columns
522518
def test_alter_column_identity_add_not_supported(self, sd, esd):
523519
op_fixture("mssql")
524520
assert_raises_message(

tests/test_op.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ def test_add_foreign_key_initially(self):
676676
"REFERENCES t2 (bat, hoho) INITIALLY deferred"
677677
)
678678

679-
@config.requirements.foreign_key_match
680679
def test_add_foreign_key_match(self):
681680
context = op_fixture()
682681
op.create_foreign_key(
@@ -1217,15 +1216,13 @@ def test_naming_changes_drop_idx(self):
12171216
op.drop_index("ik_test", table_name="t1")
12181217
context.assert_("DROP INDEX ik_test ON t1")
12191218

1220-
@config.requirements.comments
12211219
def test_create_table_comment_op(self):
12221220
context = op_fixture()
12231221

12241222
op.create_table_comment("some_table", "table comment")
12251223

12261224
context.assert_("COMMENT ON TABLE some_table IS 'table comment'")
12271225

1228-
@config.requirements.comments
12291226
def test_drop_table_comment_op(self):
12301227
context = op_fixture()
12311228

tests/test_oracle.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from alembic import op
1212
from alembic.testing import assert_raises_message
1313
from alembic.testing import combinations
14-
from alembic.testing import config
1514
from alembic.testing import eq_
1615
from alembic.testing import is_true
1716
from alembic.testing.env import _no_sql_testing_config
@@ -68,7 +67,6 @@ def test_add_column_with_default(self):
6867
)
6968
context.assert_("ALTER TABLE t1 ADD c1 INTEGER DEFAULT '12' NOT NULL")
7069

71-
@config.requirements.comments
7270
def test_add_column_with_comment(self):
7371
context = op_fixture("oracle")
7472
op.add_column(
@@ -79,7 +77,6 @@ def test_add_column_with_comment(self):
7977
"COMMENT ON COLUMN t1.c1 IS 'c1 comment'",
8078
)
8179

82-
@config.requirements.computed_columns
8380
def test_add_column_computed(self):
8481
context = op_fixture("oracle")
8582
op.add_column(
@@ -99,7 +96,6 @@ def test_add_column_computed(self):
9996
lambda: Computed("foo * 5"),
10097
),
10198
)
102-
@config.requirements.computed_columns
10399
def test_alter_column_computed_not_supported(self, sd, esd):
104100
op_fixture("oracle")
105101
assert_raises_message(
@@ -242,7 +238,6 @@ def test_alter_do_everything(self):
242238
"ALTER TABLE t RENAME COLUMN c TO c2",
243239
)
244240

245-
@config.requirements.comments
246241
def test_create_table_with_column_comments(self):
247242
context = op_fixture("oracle")
248243
op.create_table(

tests/test_postgresql.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ def test_drop_table_comment(self):
347347
op.drop_table_comment("t2", existing_comment="t2 table", schema="foo")
348348
context.assert_("COMMENT ON TABLE foo.t2 IS NULL")
349349

350-
@config.requirements.computed_columns
351350
def test_add_column_computed(self):
352351
context = op_fixture("postgresql")
353352
op.add_column(
@@ -369,7 +368,6 @@ def test_add_column_computed(self):
369368
lambda: Computed("foo * 5"),
370369
),
371370
)
372-
@config.requirements.computed_columns
373371
def test_alter_column_computed_not_supported(self, sd, esd):
374372
op_fixture("postgresql")
375373
assert_raises_message(
@@ -384,7 +382,6 @@ def test_alter_column_computed_not_supported(self, sd, esd):
384382
existing_server_default=esd(),
385383
)
386384

387-
@config.requirements.identity_columns
388385
@combinations(
389386
({}, None),
390387
(dict(always=True), None),
@@ -406,7 +403,6 @@ def test_add_column_identity(self, kw, text):
406403
"INTEGER GENERATED %s AS IDENTITY%s" % (qualification, options)
407404
)
408405

409-
@config.requirements.identity_columns
410406
@combinations(
411407
({}, None),
412408
(dict(always=True), None),
@@ -430,7 +426,6 @@ def test_add_identity_to_column(self, kw, text):
430426
"GENERATED %s AS IDENTITY%s" % (qualification, options)
431427
)
432428

433-
@config.requirements.identity_columns
434429
def test_remove_identity_from_column(self):
435430
context = op_fixture("postgresql")
436431
op.alter_column(
@@ -443,7 +438,6 @@ def test_remove_identity_from_column(self):
443438
"ALTER TABLE t1 ALTER COLUMN some_column DROP IDENTITY"
444439
)
445440

446-
@config.requirements.identity_columns
447441
@combinations(
448442
({}, dict(always=True), "SET GENERATED ALWAYS"),
449443
(

tests/test_sqlite.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def test_drop_explicit_constraint(self):
6767
"sometable",
6868
)
6969

70-
@config.requirements.comments
7170
def test_create_table_with_comment_ignored(self):
7271
context = op_fixture("sqlite")
7372
op.create_table(
@@ -81,7 +80,6 @@ def test_create_table_with_comment_ignored(self):
8180
"c2 INTEGER, PRIMARY KEY (c1))"
8281
)
8382

84-
@config.requirements.comments
8583
def test_add_column_with_comment_ignored(self):
8684
context = op_fixture("sqlite")
8785
op.add_column("t1", Column("c1", Integer, comment="c1 comment"))

0 commit comments

Comments
 (0)