def test_shp_to_xml_validation(self): """ """ # Build shapefiles gem_unlink("dummy1.xml") gem_rmtree("source_shp") os.mkdir("source_shp") gem_run_script(self.prog, [ "--input-nrml-file", self.input_file, "--output-file", os.path.join("source_shp", "src_model_files"), "--validate"]) # Run test for all shapefiles point_file = os.path.join("source_shp", "src_model_files" + "_point") area_file = os.path.join("source_shp", "src_model_files" + "_area") simple_file = os.path.join("source_shp", "src_model_files" + "_simple") complex_file = os.path.join("source_shp", "src_model_files" + "_complex") gem_run_script(self.prog, ["--input-shp-files", point_file, area_file, simple_file, complex_file, "--output-file", "dummy1.xml", "--validate"]) # cleanup gem_unlink("dummy1.xml", True) gem_rmtree("source_shp", True)
def test_uhs_converter_wo_plotting(self): """ Tests the execution without plotting """ gem_unlink("dummy_uhs.csv") gem_run_script(self.prog, ["--input-file", self.input_file, "--output-file", "dummy_uhs"]) # Cleanup gem_unlink("dummy_uhs.csv", True)
def test_hazard_map_converter(self): """ Tests the hazard map converter """ gem_unlink("dummy_hazard_map.csv") gem_run_script(self.prog, ["--input-file", self.input_file, "--output-file", "dummy_hazard_map"]) # Cleanup gem_unlink("dummy_hazard_map.csv", True)
def test_wo_plotting(self): """ Tests the execution without plotting """ gem_unlink("dummy_hazard_curve.csv") gem_run_script(self.prog, ["--input-file", self.input_file, "--output-file", "dummy_hazard_curve"]) # Cleanup gem_unlink("dummy_hazard_curve.csv", True)
def test_csv_to_xml(self): """ """ gem_unlink("dummy_site.xml") input_file = os.path.join(os.path.dirname(__file__), "..", "sample_data", "sample_site_model.csv") gem_run_script(self.prog, ["--input-csv-file", input_file, "--output-xml-file", "dummy_site.xml"]) # cleanup gem_unlink("dummy_site.xml", True)