Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.16 KB

File metadata and controls

24 lines (17 loc) · 1.16 KB

Testing

Testing the data_input.py

We wanted to know whether the function would accept valid input and raise an error if it was invalid input. Since the function has to run beforehand we need to enter the entries manually before the result of the unittest is going to be displayed. If we only run the row with the valid value (and comment the other row out) we get a perfectly fine working unittest. As soon as we test for the invalid input too, the unittest is looping for infinity by generating the in the function implemented Error Message.

Testing the import_cleaning.py

We were interested in both the functionality of our code to convert other datatypes (objects) into strings and also if our function could differentiate between two different strings. Therefore we checked using assertEqual() and did in fact see, that if we modified our expected results (eg sting11 instead of string1) we would get the unittest to fail.

Testing the line_finder.py

Our line_finder is able to detect the lines which go through listed cities in the dataframe. So we tested with two examples, whether our function finds the lines which are aligned to the cities in the dataframe.