import sys import unittest import notscared.converters as conv class TestConverter(unittest.TestCase): def setUp(self): self.converter = conv.Converter() def test_db_to_h5(self): # Test case setup db_path = "test.db" table_name = 'traces' columns = ['samples', 'ptxt', 'ctxt', 'tile_x', 'tile_y'] # Run the method self.converter.db_to_h5(db_path, table_name, columns) h5_path = db_path.replace(".db", ".h5") # Assertions self.assertEqual(h5_path, "test.h5") if __name__ == '__main__': unittest.main()