MCPcopy Create free account
hub / github.com/Vanderhoof/PyDBML / test_delete_column

Method test_delete_column

test/test_classes/test_table.py:103–116  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

101 t.add_column('wrong type')
102
103 def test_delete_column(self) -> None:
104 t = Table('products')
105 c1 = Column('id', 'integer')
106 c2 = Column('name', 'varchar2')
107 t.add_column(c1)
108 t.add_column(c2)
109 t.delete_column(c1)
110 self.assertIsNone(c1.table)
111 self.assertNotIn(c1, t.columns)
112 t.delete_column(0)
113 self.assertIsNone(c2.table)
114 self.assertNotIn(c2, t.columns)
115 with self.assertRaises(ColumnNotFoundError):
116 t.delete_column(c2)
117
118 def test_add_index(self) -> None:
119 t = Table('products')

Callers

nothing calls this directly

Calls 4

add_columnMethod · 0.95
delete_columnMethod · 0.95
TableClass · 0.90
ColumnClass · 0.90

Tested by

no test coverage detected