(self)
| 122 | ) |
| 123 | |
| 124 | def test_nullable_kwarg(self): |
| 125 | t = Table( |
| 126 | "t", |
| 127 | MetaData(), |
| 128 | Column("a", Integer(), Identity(), nullable=False), |
| 129 | Column("b", Integer(), Identity(), nullable=True), |
| 130 | Column("c", Integer(), Identity()), |
| 131 | ) |
| 132 | |
| 133 | is_(t.c.a.nullable, False) |
| 134 | is_(t.c.b.nullable, True) |
| 135 | is_(t.c.c.nullable, False) |
| 136 | |
| 137 | nullable = "" |
| 138 | if getattr( |
| 139 | self, "__dialect__", None |
| 140 | ) != "default_enhanced" and testing.against("postgresql"): |
| 141 | nullable = " NULL" |
| 142 | |
| 143 | self.assert_compile( |
| 144 | CreateTable(t), |
| 145 | ( |
| 146 | "CREATE TABLE t (" |
| 147 | "a INTEGER GENERATED BY DEFAULT AS IDENTITY, " |
| 148 | "b INTEGER GENERATED BY DEFAULT AS IDENTITY%s, " |
| 149 | "c INTEGER GENERATED BY DEFAULT AS IDENTITY" |
| 150 | ")" |
| 151 | ) |
| 152 | % nullable, |
| 153 | ) |
| 154 | |
| 155 | |
| 156 | class IdentityDDL(_IdentityDDLFixture, fixtures.TestBase): |
nothing calls this directly
no test coverage detected