(self)
| 22 | self.assertEqual(t2.schema, 'schema1') |
| 23 | |
| 24 | def test_getitem(self) -> None: |
| 25 | t = Table('products') |
| 26 | c1 = Column('col1', 'integer') |
| 27 | c2 = Column('col2', 'integer') |
| 28 | c3 = Column('col3', 'integer') |
| 29 | t.add_column(c1) |
| 30 | t.add_column(c2) |
| 31 | t.add_column(c3) |
| 32 | self.assertIs(t['col1'], c1) |
| 33 | self.assertIs(t[1], c2) |
| 34 | with self.assertRaises(IndexError): |
| 35 | t[22] |
| 36 | with self.assertRaises(TypeError): |
| 37 | t[None] |
| 38 | with self.assertRaises(ColumnNotFoundError): |
| 39 | t['wrong'] |
| 40 | |
| 41 | def test_init_with_columns(self) -> None: |
| 42 | t = Table( |
nothing calls this directly
no test coverage detected