MCPcopy Create free account
hub / github.com/PyTables/PyTables / test01_nonexistentField

Method test01_nonexistentField

tables/tests/test_tables.py:3525–3542  ·  view source on GitHub ↗

Checking non-existing Field in getCol method

(self)

Source from the content-addressed store, hash-verified

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
3545class GetItemTestCase(common.TempFileMixin, common.PyTablesTestCase):

Callers

nothing calls this directly

Calls 2

colMethod · 0.80
get_nodeMethod · 0.45

Tested by

no test coverage detected