Checking non-existing Field in getCol method
(self)
| 3523 | checkgetCol = 1 |
| 3524 | |
| 3525 | def test01_nonexistentField(self): |
| 3526 | """Checking non-existing Field in getCol method""" |
| 3527 | |
| 3528 | if common.verbose: |
| 3529 | print("\n", "-=" * 30) |
| 3530 | print( |
| 3531 | "Running %s.test01_nonexistentField..." |
| 3532 | % self.__class__.__name__ |
| 3533 | ) |
| 3534 | |
| 3535 | # Create an instance of an HDF5 Table |
| 3536 | self.h5file = tb.open_file(self.h5fname, "r") |
| 3537 | self.root = self.h5file.root |
| 3538 | table = self.h5file.get_node("/table0") |
| 3539 | |
| 3540 | with self.assertRaises(KeyError): |
| 3541 | # column = table.read(field='non-existent-column') |
| 3542 | table.col("non-existent-column") |
| 3543 | |
| 3544 | |
| 3545 | class GetItemTestCase(common.TempFileMixin, common.PyTablesTestCase): |