svir.test.unit package

Submodules

svir.test.unit.test_calculate_indices module

class svir.test.unit.test_calculate_indices.CalculateCompositeVariableTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_average()[source]
test_calculate_svi()[source]
test_custom_operator()[source]
test_geometric_mean_negative_argument()[source]
test_geometric_mean_positive_argument()[source]
test_simple_multiplication()[source]
test_simple_sum()[source]
test_weighted_multiplication()[source]
test_weighted_sum()[source]
svir.test.unit.test_calculate_indices.calculate_education_node(proj_def, operator, layer)[source]

Use the calculate_node function to compute the ‘Education’ node using the given project definition and operator. The layer is updated as a side effect.

svir.test.unit.test_calculate_indices.write_output(res_layer, data_dir_name, res_layer_name)[source]

svir.test.unit.test_init module

class svir.test.unit.test_init.TestInit(methodName='runTest')[source]

Bases: qgis.testing.TestCase

Test that the plugin init is usable for QGIS.

Based heavily on the validator class by Alessandro Passoti available here:

http://github.com/qgis/qgis-django/blob/master/qgis-app/
plugins/validator.py
test_read_init()[source]

Test that the plugin __init__ will validate on plugins.qgis.org.

svir.test.unit.test_irmt module

class svir.test.unit.test_irmt.IrmtTest(methodName='runTest')[source]

Bases: qgis.testing.TestCase

Test OpenQuake IRMT works.

setUp()[source]

Runs before each test.

tearDown()[source]

Runs after each test.

test_icon_png()[source]

Test we can click OK.

test_toggle_active_actions()[source]

svir.test.unit.test_load_oq_engine_output_as_layer module

class svir.test.unit.test_load_oq_engine_output_as_layer.LoadOQEngineOutputAsLayerTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_load_ruptures()[source]

svir.test.unit.test_loss_aggreagation module

class svir.test.unit.test_loss_aggreagation.AggregateLossByZoneTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

on_calculate_zonal_stats_finished(output_zonal_layer)[source]
setUp()[source]
test_sum_point_values_by_zone()[source]

svir.test.unit.test_metadata_utilities module

InaSAFE Disaster risk assessment tool developed by AusAid - Exception Classes.

Custom exception classes for the IS application.

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 svir.test.unit.test_metadata_utilities.TestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

test_generate_iso_metadata()[source]
test_valid_iso_xml()[source]

svir.test.unit.test_process_layer module

class svir.test.unit.test_process_layer.AddAttributesTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_add_attributes()[source]
test_find_attribute_id()[source]
class svir.test.unit.test_process_layer.CheckProjectionsTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_different_projections()[source]
test_same_projections()[source]
class svir.test.unit.test_process_layer.CompareLayerContentTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_same_content_case_first_layer_has_more_features()[source]
test_same_content_case_layers_are_completely_different()[source]
test_same_content_case_layers_are_equal()[source]
test_same_content_case_second_layer_has_more_features()[source]

svir.test.unit.test_qgis_environment module

InaSAFE Disaster risk assessment tool developed by AusAid - ISClipper test suite.

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 svir.test.unit.test_qgis_environment.QGISTest(methodName='runTest')[source]

Bases: qgis.testing.TestCase

Test the QGIS Environment.

test_qgis_environment()[source]

QGIS environment has the expected providers.

svir.test.unit.test_recovery_modeling module

svir.test.unit.test_transformations module

class svir.test.unit.test_transformations.Log10TestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_log10_all_positive_values()[source]
test_log10_incrementing_by_one_case_no_zeros_found()[source]
test_log10_incrementing_by_one_case_zeros_found()[source]
test_log10_with_negative_values()[source]
test_log10_with_zeros_unchanged()[source]
class svir.test.unit.test_transformations.MinMaxTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_min_max_direct()[source]
test_min_max_inverse()[source]
class svir.test.unit.test_transformations.MissingValuesTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

test_transform_with_missing_values()[source]
class svir.test.unit.test_transformations.QuadraticTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_quadratic_direct_decreasing()[source]
test_quadratic_direct_increasing()[source]
test_quadratic_inverse_decreasing()[source]
test_quadratic_inverse_increasing()[source]
class svir.test.unit.test_transformations.RankTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_rank_direct_average()[source]
test_rank_direct_dense()[source]
test_rank_direct_max()[source]
test_rank_direct_min()[source]
test_rank_direct_ordinal()[source]
test_rank_inverse_average()[source]
test_rank_inverse_dense()[source]
test_rank_inverse_max()[source]
test_rank_inverse_min()[source]
test_rank_inverse_ordinal()[source]
class svir.test.unit.test_transformations.SigmoidTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_sigmoid_direct()[source]
test_sigmoid_inverse()[source]
test_sigmoid_inverse_zero_division()[source]
class svir.test.unit.test_transformations.ZScoreTestCase(methodName='runTest')[source]

Bases: qgis.testing.TestCase

setUp()[source]
test_z_score_direct()[source]
test_z_score_inverse()[source]

svir.test.unit.test_translations module

Safe Translations Test.

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 svir.test.unit.test_translations.SafeTranslationsTest(methodName='runTest')[source]

Bases: qgis.testing.TestCase

Test translations work.

setUp()[source]

Runs before each test.

tearDown()[source]

Runs after each test.

test_qgis_translations()[source]

Test that translations work.

Module contents