Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan committed Jan 13, 2025
1 parent c22cff4 commit 19c7c3d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions test/NXSData_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,17 @@ def test_openfile(self):
ins = en.open("configuration")
self.assertTrue(ins.is_valid)
self.assertEqual(ins.name, "configuration")
self.assertEqual(len(ins.attributes), 1)
self.assertEqual(ins.size, 1)
# self.assertEqual(len(ins.attributes), 1)
# self.assertEqual(ins.size, 1)

at = ins.attributes["NX_class"]
self.assertTrue(at.is_valid)
self.assertTrue(hasattr(at.shape, "__iter__"))
self.assertEqual(len(at.shape), 0)
self.assertEqual(at.shape, ())
self.assertEqual(at.dtype, "string")
self.assertEqual(at.name, "NX_class")
self.assertEqual(at[...], "NXcollection")
# at = ins.attributes["NX_class"]
# self.assertTrue(at.is_valid)
# self.assertTrue(hasattr(at.shape, "__iter__"))
# self.assertEqual(len(at.shape), 0)
# self.assertEqual(at.shape, ())
# self.assertEqual(at.dtype, "string")
# self.assertEqual(at.name, "NX_class")
# self.assertEqual(at[...], "NXcollection")

f.close()

Expand Down Expand Up @@ -470,17 +470,17 @@ def test_closefile(self):
ins = en.open("configuration")
self.assertTrue(ins.is_valid)
self.assertEqual(ins.name, "configuration")
self.assertEqual(len(ins.attributes), 1)
self.assertEqual(ins.size, 1)
# self.assertEqual(len(ins.attributes), 1)
# self.assertEqual(ins.size, 1)

at = ins.attributes["NX_class"]
self.assertTrue(at.is_valid)
self.assertTrue(hasattr(at.shape, "__iter__"))
self.assertEqual(len(at.shape), 0)
self.assertEqual(at.shape, ())
self.assertEqual(at.dtype, "string")
self.assertEqual(at.name, "NX_class")
self.assertEqual(at[...], "NXcollection")
# at = ins.attributes["NX_class"]
# self.assertTrue(at.is_valid)
# self.assertTrue(hasattr(at.shape, "__iter__"))
# self.assertEqual(len(at.shape), 0)
# self.assertEqual(at.shape, ())
# self.assertEqual(at.dtype, "string")
# self.assertEqual(at.name, "NX_class")
# self.assertEqual(at[...], "NXcollection")

f.close()

Expand Down

0 comments on commit 19c7c3d

Please sign in to comment.