-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Two tests in aurora fail when running on a Mac.
FAILED test_define_frequency_bands.py::TestDefineBandsFromDict::test_can_declare_frequencies_directly_in_config - AssertionError: assert TF( survey='EMTF Synthetic', station='test1', latitude=18.00, longitude=0.00, elevation=0.00 ) == TF( survey='EMTF Synthetic', station='test1', latitude=18.00, ...
FAILED test_fourier_coefficients.py::TestAddFourierCoefficientsToSyntheticData::test_create_then_use_stored_fcs_for_processing - AssertionError: assert TF( survey='EMTF Synthetic', station='test2', latitude=18.00, longitude=0.00, elevation=0.00 ) == TF( survey='EMTF Synthetic', station='test2', latitude=18.00, ...
This appears to be due to unequal values for residual covariance when comparing two supposedly identical TFs. The difference is around 2e-27, and will be ignored for now. How to handle this?
One way is to create a compare_tf_equality method in test_helpers. This method can assert, for example:
np.isclose(tf_cls2.residual_covariance, tf_cls1.residual_covariance, atol=1e-26, rtol=1e-30).all()
and once that is asserted, set
tf_cls2.residual_covariance = tf_cls1.residual_covariance
then equality of other attrs can be asserted.
Metadata
Metadata
Assignees
Labels
No labels