diff --git a/unittests/test_h5.py b/unittests/test_h5.py new file mode 100644 index 0000000000000000000000000000000000000000..e1a076add7e3b6c1dbff4080ea51b2dc49457b95 --- /dev/null +++ b/unittests/test_h5.py @@ -0,0 +1,21 @@ +import unittest +import caosdb as db +import h5py + +from caosadvancedtools.cfoods import h5 + + +class H5CFoodTest(unittest.TestCase): + def test_create_record(self): + testCrawler = h5.H5CFood() + testCrawler.h5file = ".\hdf5_dummy_file.hdf5" + a = testCrawler.create_record(testCrawler.h5file) + print(a) + self.assertTrue(1) + + +with h5py.File("hdf5_dummy_file.hdf5", mode="a") as hdf5: + testCrawler = h5.H5CFood(crawled_path = ".\hdf5_dummy_file.hdf5") + testCrawler.h5file = ".\hdf5_dummy_file.hdf5" + a = testCrawler.create_record(hdf5) + print(a) \ No newline at end of file