summaryrefslogtreecommitdiff
path: root/tests/test_op.py
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2021-06-08 16:56:39 -0600
committerGord Thompson <gord@gordthompson.com>2021-06-18 11:08:19 -0600
commitc48373b5ae95a6dc84d4f02404f0b2da54f54a61 (patch)
tree548dfbb6bdf7a063aea68618871c7e558690325b /tests/test_op.py
parent01b5e5fa08c646d3d1f65c731136a1a6a9255315 (diff)
downloadalembic-c48373b5ae95a6dc84d4f02404f0b2da54f54a61.tar.gz
Implement "test suite"
Fixes: #855 Change-Id: I11386597d9f3a260d7349b58d276b44d78642a6a
Diffstat (limited to 'tests/test_op.py')
-rw-r--r--tests/test_op.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/test_op.py b/tests/test_op.py
index 1b82938..3841f25 100644
--- a/tests/test_op.py
+++ b/tests/test_op.py
@@ -3,7 +3,6 @@
from sqlalchemy import Boolean
from sqlalchemy import CheckConstraint
from sqlalchemy import Column
-from sqlalchemy import event
from sqlalchemy import exc
from sqlalchemy import ForeignKey
from sqlalchemy import Index
@@ -26,18 +25,11 @@ from alembic.testing import config
from alembic.testing import eq_
from alembic.testing import is_not_
from alembic.testing import mock
-from alembic.testing.fixtures import AlterColRoundTripFixture
from alembic.testing.fixtures import op_fixture
from alembic.testing.fixtures import TestBase
from alembic.util import sqla_compat
-@event.listens_for(Table, "after_parent_attach")
-def _add_cols(table, metadata):
- if table.name == "tbl_with_auto_appended_column":
- table.append_column(Column("bat", Integer))
-
-
class OpTest(TestBase):
def test_rename_table(self):
context = op_fixture()
@@ -1235,28 +1227,3 @@ class ObjectFromToTest(TestBase):
assert_raises_message(
ValueError, "constraint cannot be produced", op.to_constraint
)
-
-
-class BackendAlterColumnTest(AlterColRoundTripFixture, TestBase):
- __backend__ = True
-
- def test_rename_column(self):
- self._run_alter_col({}, {"name": "newname"})
-
- def test_modify_type_int_str(self):
- self._run_alter_col({"type": Integer()}, {"type": String(50)})
-
- def test_add_server_default_int(self):
- self._run_alter_col({"type": Integer}, {"server_default": text("5")})
-
- def test_modify_server_default_int(self):
- self._run_alter_col(
- {"type": Integer, "server_default": text("2")},
- {"server_default": text("5")},
- )
-
- def test_modify_nullable_to_non(self):
- self._run_alter_col({}, {"nullable": False})
-
- def test_modify_non_nullable_to_nullable(self):
- self._run_alter_col({"nullable": False}, {"nullable": True})