safe.gui.widgets.test.test_dock module

InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - GUI 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.widgets.test.test_dock.TestDock(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test the InaSAFE GUI.

setUp()[source]

Fixture run before all tests

classmethod setUpClass()[source]
tearDown()[source]

Fixture run after each test

test_add_above_layer()[source]

Test we can add one layer above another - see #2322

New in version 3.2.

test_cbo_aggregation_empty_project()[source]

Aggregation combo changes properly according on no loaded layers

test_cbo_aggregation_toggle()[source]

Aggregation Combobox toggles on and off as expected.

test_defaults()[source]

Test the GUI in its default state

test_full_run_pyzstats()[source]

Aggregation results correct using our own python zonal stats code.

test_full_run_qgszstats()[source]

Aggregation results are correct using native QGIS zonal stats.

Note

We know this is going to fail (hence the decorator) as QGIS1.8 zonal stats are broken. We expect this to pass when we have ported to the QGIS 2.0 api at which time we can remove the decorator. TS July 2013

test_has_parameters_button_disabled()[source]

Function configuration button is disabled when layers not compatible.

test_has_parameters_button_enabled()[source]

Function configuration button is enabled when layers are compatible.

test_insufficient_overlap()[source]

Test Insufficient overlap errors are caught.

..note:: See https://github.com/AIFDR/inasafe/issues/372

test_issue1191()[source]

Test setting a layer’s title in the kw directly from qgis api

test_issue160()[source]

Test that multipart features can be used in a scenario - issue #160

test_issue306()[source]

Issue306: CANVAS doesnt add generated layers in tests.

See https://github.com/AIFDR/inasafe/issues/306

test_issue317()[source]

Points near the edge of a raster hazard layer are interpolated OK

test_issue47()[source]

Issue47: Hazard & exposure data are in different proj to viewport.

See https://github.com/AIFDR/inasafe/issues/47

test_issue581()[source]

Test issue #581 in github - Humanize can produce IndexError : list index out of range

test_issue71()[source]

Test issue #71 in github - cbo changes should update ok button.

test_layer_changed()[source]

Test the metadata is updated as the user highlights layers.

For inasafe outputs, the table of results should be shown See also https://github.com/AIFDR/inasafe/issues/58

test_layer_legend_index()[source]

Test we can get the legend index for a layer.

New in version 3.2.

test_layer_saved_as_with_keywords_and_xml()[source]

Check that auxiliary files are well copied when they exist and the ‘saved as’ is used.

test_layer_saved_as_without_keywords_and_xml()[source]

Check that auxiliary files aren’t created when they don’t exist and the ‘saved as’ is used.

test_load_layers()[source]

Layers can be loaded and list widget was updated appropriately

test_new_layers_show_in_canvas()[source]

Check that when we add a layer we can see it in the canvas list.

test_result_styling()[source]

Test that colours and opacity from a model are correctly styled.

test_rubber_bands()[source]

Test that the rubber bands get updated.

test_set_dock_title()[source]

Test the dock title gets set properly.

test_set_ok_button_status()[source]

OK button changes properly according to self.dock validity

test_state()[source]

Check if the save/restore state methods work. See also https://github.com/AIFDR/inasafe/issues/58

test_user_defined_extent()[source]

Test that analysis honours user defined extents.

Note that when testing on a desktop system this will overwrite your user defined analysis extent.

test_validate()[source]

Validate function work as expected

wkt_to_coordinates(wkt)[source]

Convert a wkt into a nested array of float pairs.

xtest_extents_changed()[source]

Memory requirements are calculated correctly when extents change.

xtest_print_map()[source]

Test print map, especially on Windows.