def test_GDF_get_descriptor(self): "Test GDF get_descriptor function" #TODO: Define tests which check DB contents test_gdf = GDF() # Test default configuration descriptor = test_gdf.get_descriptor(self.TEST_3D_PARAMETER) descriptor = test_gdf.get_descriptor(self.TEST_2D_PARAMETER) descriptor = test_gdf.get_descriptor()
def open_raw_record_file(self): self.ws_client.raw_data.clear() self.ws_client.raw_data_ticks.clear() self.ws_client.raw_data_events.clear() self.mkdir_p(os.path.dirname(self.filepath)) self.target_file = GDF(filename=self.filepath, ch_num=self.ch_num, ch_label=self.ch_label, sps=self.raw_sample_rate)
def test_GDF(self): "Test GDF constructor" test_gdf = GDF() # Test default configuration assert test_gdf.code_root == os.path.abspath( os.path.join(os.path.dirname(os.path.dirname(__file__)), 'gdf')), 'Code root is incorrect' assert len(test_gdf.config_files ) == 1, 'Default config path list should have one entry' assert test_gdf.config_files[0] == os.path.abspath( os.path.join( test_gdf.code_root, GDF.DEFAULT_CONFIG_FILE)), 'Default config path is incorrect' assert test_gdf.command_line_params is not None, 'Command line parameter dict not set' assert test_gdf.configuration is not None, 'Configurations dict not set' assert len(test_gdf.configuration ) > 0, 'Config files must define at least one setup' assert len( test_gdf.databases) > 0, 'At least one database must be set up' assert test_gdf.storage_config is not None, 'storage configuration dict not set' assert len( test_gdf.storage_config ) > 0, 'storage configuration dict must contain at least one storage_type definition'
def __init__(self): logger.debug('Initialise Analytics Module.') self.gdf = GDF() self.gdf.debug = False self.plan = [] self.planDict = {}
def __init__(self): logger.debug('Initialise Execution Module.') self.gdf = GDF() self.gdf.debug = False self.cache = {}