Checking the lengths of strings (read field).
(self)
| 1347 | self.table.flush() |
| 1348 | |
| 1349 | def test01(self): |
| 1350 | """Checking the lengths of strings (read field).""" |
| 1351 | |
| 1352 | if self.close: |
| 1353 | self._reopen(mode="a") |
| 1354 | self.table = self.h5file.root.group.table |
| 1355 | |
| 1356 | # Get both strings |
| 1357 | str1 = self.table.col("Text")[0] |
| 1358 | str2 = self.table.col("Text")[1] |
| 1359 | if common.verbose: |
| 1360 | print("string1-->", str1) |
| 1361 | print("string2-->", str2) |
| 1362 | |
| 1363 | # Check that both NumPy objects are equal |
| 1364 | self.assertEqual(len(str1), len(b"Hello Francesc!")) |
| 1365 | self.assertEqual(len(str2), len(b"Hola Francesc!")) |
| 1366 | self.assertEqual(str1, b"Hello Francesc!") |
| 1367 | self.assertEqual(str2, b"Hola Francesc!") |
| 1368 | |
| 1369 | def test02(self): |
| 1370 | """Checking the lengths of strings (read recarray).""" |