safe.gui.tools.shake_grid.test.test_shake_grid module

InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - Converter Test Cases.

Contact : ole.moller.nielsen@gmail.com

Note

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe.gui.tools.shake_grid.test.test_shake_grid.ShakeGridTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Class to test ShakeGrid.

check_feature_count(path, count)[source]

Method to check the features number of a vector layer.

Parameters:
  • path (str) – Path to vector layer.
  • count (int) – The base number to check against.
classmethod tearDownClass()[source]

Class method called after tests on this class have run.

test_convert_grid_to_raster()[source]

Test converting grid.xml to raster (tif file)

test_event_to_contours()[source]

Check we can extract contours from the event

test_extract_date_time()[source]

Test extract_date_time giving the correct output.

test_grid_file_path()[source]

Test grid_file_path works properly.

test_mmi_to_delimited_file()[source]

Test mmi_to_delimited_file works.

test_mmi_to_delimited_text()[source]

Test mmi_to_delimited_text works.

test_mmi_to_raster()[source]

Check we can convert the shake event to a raster.

test_mmi_to_shapefile()[source]

Check we can convert the shake event to a shapefile.

test_parse_grid_xml()[source]

Test parse_grid_xml works.