Testing the pelicun.file_io module

These are unit and integration tests on the file_io module of pelicun.

pelicun.tests.test_file_io.test_read_SimCenter_DL_input_minimum_input()[source]

Test if the minimum input is read without producing any errors and also check if some warnings are shown that draw attention to the lack of potentially important information in the input file.

pelicun.tests.test_file_io.test_read_SimCenter_DL_input_full_input()[source]

Test if the full input (i.e. all possible fields populated and all supported decision variables turned on) is read without producing any errors or warnings.

pelicun.tests.test_file_io.test_read_SimCenter_DL_input_non_standard_units()[source]

Test if the inputs are properly converted when non-standard units are used.

pelicun.tests.test_file_io.test_read_SimCenter_DL_input_unknown_unit()[source]

Test if a warning is shown if the input file contains an unknown unit type.

pelicun.tests.test_file_io.test_read_SimCenter_DL_input_injuries_only()[source]

Test if the inputs are read properly if the user is only interested in calculating injuries.

pelicun.tests.test_file_io.test_read_SimCenter_DL_input_unknown_component_unit()[source]

Test if an error is shown if the input file contains an unknown unit type for one of the components.

pelicun.tests.test_file_io.test_read_SimCenter_DL_input_no_realizations()[source]

Test if an error is shown if the input file contains no information about the number of realizations to run.

pelicun.tests.test_file_io.test_read_SimCenter_EDP_input()[source]

Test if the function can read the provided set of EDPs from a file and return them and the corresponding additional information in a properly structured format.

pelicun.tests.test_file_io.test_read_population_distribution()[source]

Test if the population distribution is read according to the specified occupancy type and if the peak population is properly converted from 1/1000*ft2 to 1/m2.

pelicun.tests.test_file_io.test_read_component_DL_data()[source]

Test if the component data is properly read from the resource xml files. Use a series of tests to see if certain component features trigger proper warnings or errors.