Assert that column instance maps of both tables are equal.
(self, table1, table2)
| 5724 | |
| 5725 | class CopyTestCase(common.TempFileMixin, common.PyTablesTestCase): |
| 5726 | def assertEqualColinstances(self, table1, table2): |
| 5727 | """Assert that column instance maps of both tables are equal.""" |
| 5728 | |
| 5729 | cinst1, cinst2 = table1.colinstances, table2.colinstances |
| 5730 | self.assertEqual(len(cinst1), len(cinst2)) |
| 5731 | for cpathname, col1 in cinst1.items(): |
| 5732 | self.assertTrue(cpathname in cinst2) |
| 5733 | col2 = cinst2[cpathname] |
| 5734 | self.assertIsInstance(col1, type(col2)) |
| 5735 | if isinstance(col1, tb.Column): |
| 5736 | self.assertEqual(col1.name, col2.name) |
| 5737 | self.assertEqual(col1.pathname, col2.pathname) |
| 5738 | self.assertEqual(col1.dtype, col2.dtype) |
| 5739 | self.assertEqual(col1.type, col2.type) |
| 5740 | elif isinstance(col1, tb.Cols): |
| 5741 | self.assertEqual(col1._v_colnames, col2._v_colnames) |
| 5742 | self.assertEqual(col1._v_colpathnames, col2._v_colpathnames) |
| 5743 | |
| 5744 | def test01_copy(self): |
| 5745 | """Checking Table.copy() method.""" |
no test coverage detected