MetOffice / CATNIP

Climate Analysis Tool: Now In Python
Other
5 stars 2 forks source link

add unit test for utils.compare_coords and utils.compare_cubes #107

Closed gredmond-mo closed 4 years ago

gredmond-mo commented 4 years ago

The two functions above need unit tests and potentially a bug fix.

gredmond-mo commented 4 years ago

Note - this is now complete. There is not a bug as such in the function, however at the moment, it is does distinguish between auxiliary and scalar coordinates, it also does not compare attributes. We may want to add this functionality and clarify the differences between coord types in the future.

The unit tests are sensitive to the output message such that any change to the function means the positions that are hardcoded in the tests may need reviewing. For example:

func_cube1_long_name = out_str[0].split()[3]

The doc tests would also need reviewing.