Пример #1
0
    def test__store_data_no_end(self):
        # store data removes the source data when completed, so use a temp
        tmp_src_path = create_tempfile_path()
        shutil.copy(test_data_src_path, tmp_src_path)

        output_path = create_tempfile_path()
        start = datetime(2016, 4, 21)
        filters = tables.Filters(complevel=1)
        with tables.open_file(output_path, 'w', filters=filters) as datafile:
            publicdb._store_data(datafile, '/station_501', tmp_src_path, start,
                                 None)
        validate_results(self, test_data_src_path, output_path)
        os.remove(output_path)
Пример #2
0
    def test_load_coincidences_output(self):
        """Load coincidences tsv into hdf5 and verify the output"""

        output_path = create_tempfile_path()
        perform_load_coincidences(output_path)
        validate_results(self, test_data_coincidences_path, output_path)
        os.remove(output_path)
Пример #3
0
    def test_download_coincidences(self):
        """Download coincidence data from esd and validate results"""

        output_path = create_tempfile_path()
        perform_download_coincidences(output_path)
        validate_results(self, test_data_coincidences_path, output_path)
        os.remove(output_path)
Пример #4
0
    def test_download_data(self):
        """Download data and validate results"""

        output_path = create_tempfile_path()
        perform_esd_download_data(output_path)
        validate_results(self, test_data_path, output_path)
        os.remove(output_path)
Пример #5
0
    def test_esd_output(self):
        """Use esd.load_data() to load csv into hdf5 and verify the output"""

        output_path = create_tempfile_path()
        perform_load_data(output_path)
        validate_results(self, test_data_path, output_path)
        os.remove(output_path)
Пример #6
0
    def test_download_coincidences(self):
        """Download coincidence data from esd and validate results"""

        output_path = create_tempfile_path()
        perform_download_coincidences(output_path)
        validate_results(self, test_data_coincidences_path, output_path)
        os.remove(output_path)
Пример #7
0
    def test_download_data(self):
        """Download data and validate results"""

        output_path = create_tempfile_path()
        perform_esd_download_data(output_path)
        validate_results(self, test_data_path, output_path)
        os.remove(output_path)
Пример #8
0
    def test_esd_output(self):
        """Use esd.load_data() to load csv into hdf5 and verify the output"""

        output_path = create_tempfile_path()
        perform_load_data(output_path)
        validate_results(self, test_data_path, output_path)
        os.remove(output_path)