$71 GRAYBYTE WORDPRESS FILE MANAGER $12

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/alembic/testing/suite/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/alembic/testing/suite//test_op.py
"""Test against the builders in the op.* module."""

from sqlalchemy import Column
from sqlalchemy import event
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy.sql import text

from ...testing.fixtures import AlterColRoundTripFixture
from ...testing.fixtures import TestBase


@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 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})

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
14 Aug 2025 9.24 PM
root / root
0755
__pycache__
--
14 Aug 2025 9.24 PM
root / root
0755
__init__.py
0.281 KB
17 Apr 2025 8.10 PM
root / root
0644
_autogen_fixtures.py
9.649 KB
17 Apr 2025 8.10 PM
root / root
0644
test_autogen_comments.py
6.136 KB
17 Apr 2025 8.10 PM
root / root
0644
test_autogen_computed.py
5.935 KB
17 Apr 2025 8.10 PM
root / root
0644
test_autogen_diffs.py
8.197 KB
17 Apr 2025 8.10 PM
root / root
0644
test_autogen_fks.py
32.155 KB
17 Apr 2025 8.10 PM
root / root
0644
test_autogen_identity.py
5.945 KB
17 Apr 2025 8.10 PM
root / root
0644
test_environment.py
11.599 KB
17 Apr 2025 8.10 PM
root / root
0644
test_op.py
1.312 KB
17 Apr 2025 8.10 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF