From 887ba40abac2e114880280cd031e6f2cb673d0cd Mon Sep 17 00:00:00 2001 From: Alex <akreft@trineo.org> Date: Thu, 1 Jul 2021 13:49:27 +0200 Subject: [PATCH] Inital test file --- unittests/test_h5.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 unittests/test_h5.py diff --git a/unittests/test_h5.py b/unittests/test_h5.py new file mode 100644 index 00000000..e1a076ad --- /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 -- GitLab