hydro.tests.test_accessors

Attributes

Functions

test_gen_fname_machinery(expocode, station, cast, ...)

test_coards_no_comments()

test_exchange_bottle_round_trip()

test_exchange_bottle_round_trip_with_alt()

test_exchange_bottle_round_trip_cdom()

test_exchange_ctd_round_trip()

test_nc_serialize_all_ctd(tmp_path)

A crash was discovered when the ctd elapsed time param was present, and was seralized to disk then read back in

test_nc_serialize_all_ctdetime(tmp_path)

A crash was discovered when the ctd elapsed time param was present, and was seralized to disk then read back in

test_woce_ctd_no_flags(tmp_path)

make sure data is written to the woce files when there are no qc flags

test_coards_ctdnobs_with_missing()

Test a condition where exception might be thrown when a float array with nans is cast to int

test_coards_bottle_flag_9()

Test a condition where a warning might be thrown when a bottle has flag 9

test_nc_serialize_all_ctdetime_multiple_profs(tmp_path)

Test file with CTDETIME and differing profile lengths

test_ctdetime_preserve_precision(tmp_path)

Test file with CTDETIME and differing profile lengths

test_coards_with_param_containing_slash()

Test that the COARDS conversion can deal with a parameter with a / in the name

Module Contents

hydro.tests.test_accessors.exp_stn_cast[source]
hydro.tests.test_accessors.test_gen_fname_machinery(expocode, station, cast, profile_type, profile_count, ftype)[source]
hydro.tests.test_accessors.test_coards_no_comments()[source]
hydro.tests.test_accessors.test_exchange_bottle_round_trip()[source]
hydro.tests.test_accessors.test_exchange_bottle_round_trip_with_alt()[source]
hydro.tests.test_accessors.test_exchange_bottle_round_trip_cdom()[source]
hydro.tests.test_accessors.test_exchange_ctd_round_trip()[source]
hydro.tests.test_accessors.test_nc_serialize_all_ctd(tmp_path)[source]

A crash was discovered when the ctd elapsed time param was present, and was seralized to disk then read back in

hydro.tests.test_accessors.test_nc_serialize_all_ctdetime(tmp_path)[source]

A crash was discovered when the ctd elapsed time param was present, and was seralized to disk then read back in

hydro.tests.test_accessors.test_woce_ctd_no_flags(tmp_path)[source]

make sure data is written to the woce files when there are no qc flags

hydro.tests.test_accessors.test_coards_ctdnobs_with_missing()[source]

Test a condition where exception might be thrown when a float array with nans is cast to int

This is very platform dependent and depends on undefined behavior in C. Lucky for us we can see if numpy is issuing a runtime warning (they are considering makeing this throw in the future anyway)

hydro.tests.test_accessors.test_coards_bottle_flag_9()[source]

Test a condition where a warning might be thrown when a bottle has flag 9

hydro.tests.test_accessors.test_nc_serialize_all_ctdetime_multiple_profs(tmp_path)[source]

Test file with CTDETIME and differing profile lengths

The exchange writer would crash with a zip strict error, this is solved by setting decode_timedelta to False when the file is read in

hydro.tests.test_accessors.test_ctdetime_preserve_precision(tmp_path)[source]

Test file with CTDETIME and differing profile lengths

The exchange writer would crash with a zip strict error, this is solved by setting decode_timedelta to False when the file is read in

hydro.tests.test_accessors.test_coards_with_param_containing_slash()[source]

Test that the COARDS conversion can deal with a parameter with a / in the name