def test_subset_csv(self):
        """
        Test that the subset csv writer writes the correct csv values.
        """
        inputs = [
            (get_ls1_test_prob_point_data()),
            (get_ls2_test_bbox_data()),
            (get_ls2_test_region_data()),
            (get_ls2_test_bbox_anom_data()),
            (get_ls2_test_region_anom_data()),
            (get_ls3a_test_point_data()),
            (get_ms4_test_coast_point_data()),
            (get_ls6_test_bbox_data()),
            (get_ls6_test_bbox_data_one_year()),
            (get_ls6_test_region_data()),
            (get_ls6_test_all_regions_data()),
            (get_ls6_test_all_river_monthly()),
            (get_ls6_test_country_monthly()),
        ]

        for data, input_files, reference_files, output_file_index in inputs:
            with self.subTest(
                    data=data,
                    input_files=input_files,
                    reference_files=reference_files,
                    output_file_index=output_file_index,
            ):
                diff = run_write_test(data, input_files, reference_files,
                                      output_file_index)
                self.assertEqual(diff, "", diff)
Beispiel #2
0
    def test_netcdf(self):
        """
        Test that the Net CDF writer writes the correct Net CDF values.
        """
        inputs = [(get_ls2_test_region_data())]

        for (
            data,
            input_files,
            reference_files,
            output_file_index,
            overlay_input_files,
        ) in inputs:
            with self.subTest(
                data=data,
                input_files=input_files,
                reference_files=reference_files,
                output_file_index=output_file_index,
                overlay_input_files=overlay_input_files,
            ):
                diff = run_write_test(
                    data,
                    input_files,
                    reference_files,
                    output_file_index,
                    PlotType.PLUME_PLOT,
                    overlay_input_files,
                    data_format=DataFormat.NET_CDF,
                )
                self.assertEqual(diff, "", diff)
Beispiel #3
0
    def test_single_map_sho(self):
        """
        Test that the single map shape file writer writes the correct shape file values.

        """
        inputs = [
            (get_ls6_test_bbox_data()),
            (get_ls6_test_prob_region_data_1()),
            (get_ls6_test_prob_region_data_2()),
        ]

        for data, input_files, reference_files, output_file_index in inputs:
            with self.subTest(
                data=data,
                input_files=input_files,
                reference_files=reference_files,
                output_file_index=output_file_index,
            ):
                diff = run_write_test(
                    data,
                    input_files,
                    reference_files,
                    output_file_index,
                    PlotType.SINGLE_MAP,
                    data_format=DataFormat.SHAPEFILE,
                )
                self.assertEqual(diff, "", diff)
    def test_postagestamp_shp(self):
        """
        Test that the postage stamp shape file writer writes the correct shape file
        values.
        """
        inputs = [
            (get_ls2_test_bbox_data()),
            (get_ls2_test_region_data_1()),
            (get_ls2_test_region_data_2()),
        ]

        for data, input_files, reference_files, output_file_index in inputs:
            with self.subTest(
                    data=data,
                    input_files=input_files,
                    reference_files=reference_files,
                    output_file_index=output_file_index,
            ):
                diff = run_write_test(
                    data,
                    input_files,
                    reference_files,
                    output_file_index,
                    PlotType.POSTAGE_STAMP_MAPS,
                    data_format=DataFormat.SHAPEFILE,
                )
                self.assertEqual(diff, "", diff)
 def test_ls1_point_csv(self):
     data, input_files, reference_files, output_file_index = (
         get_ls1_test_prob_point_data()
     )
     diff = run_write_test(
         data, input_files, reference_files, output_file_index, PlotType.PDF_PLOT
     )
     self.assertEqual(diff, "")
    def test_ls1_sample_csv(self):
        """
        Test that the sample csv writer writes the correct csv values.
        """
        inputs = [(get_ls1_test_prob_point_data()),
                  (get_ls1_test_prob_region_data())]

        for data, input_files, reference_files, output_file_index in inputs:
            with self.subTest(
                    data=data,
                    input_files=input_files,
                    reference_files=reference_files,
                    output_file_index=output_file_index,
            ):
                diff = run_write_test(data, input_files, reference_files,
                                      output_file_index)
                self.assertEqual(diff, "", diff)
Beispiel #7
0
    def test_three_map_csv(self):
        """
        Test that the three map csv writer writes the correct csv values.
        """
        inputs = [(get_ls1_test_prob_bbox_data()), (get_ls1_test_prob_region_data())]

        for data, input_files, reference_files, output_file_index in inputs:
            with self.subTest(
                data=data,
                input_files=input_files,
                reference_files=reference_files,
                output_file_index=output_file_index,
            ):
                diff = run_write_test(
                    data,
                    input_files,
                    reference_files,
                    output_file_index,
                    PlotType.THREE_MAPS,
                )
                self.assertEqual(diff, "", diff)
Beispiel #8
0
    def test_postagestamp_csv(self):
        """
        Test that the postage stamp csv writer writes the correct csv values.
        """
        inputs = [(get_ls2_test_bbox_data()), (get_ls2_test_region_data())]

        for data, input_files, reference_files, output_file_index in inputs:
            with self.subTest(
                    data=data,
                    input_files=input_files,
                    reference_files=reference_files,
                    output_file_index=output_file_index,
            ):
                diff = run_write_test(
                    data,
                    input_files,
                    reference_files,
                    output_file_index,
                    PlotType.POSTAGE_STAMP_MAPS,
                )
                self.assertEqual(diff, "", diff)
Beispiel #9
0
    def test_plume_csv(self):
        """
        Test that the plume csv writer writes the correct csv values.
        """
        inputs = [
            (get_ls1_test_prob_point_data()),
            (get_ls1_test_prob_region_data()),
            (get_ls1_test_prob_extreame_point_data()),
            (get_ls2_test_point_data()),
            (get_ls2_test_region_data()),
            (get_ms4_test_gauge_point_data()),
            (get_ls6_test_obs_point_data()),
            (get_ls6_test_obs_region_data()),
        ]

        for (
            data,
            input_files,
            reference_files,
            output_file_index,
            overlay_input_files,
        ) in inputs:
            with self.subTest(
                data=data,
                input_files=input_files,
                reference_files=reference_files,
                output_file_index=output_file_index,
                overlay_input_files=overlay_input_files,
            ):
                diff = run_write_test(
                    data,
                    input_files,
                    reference_files,
                    output_file_index,
                    PlotType.PLUME_PLOT,
                    overlay_input_files,
                )
                self.assertEqual(diff, "", diff)