bilby-dev / bilby

A unified framework for stochastic sampling packages and gravitational-wave inference in Python.
https://bilby-dev.github.io/bilby/
MIT License
60 stars 71 forks source link

TST: patch logger in tests #855

Closed mj-will closed 4 days ago

mj-will commented 4 days ago

Some of the tests were modifying the logger in place and mocking the warning method. This breaks the logger for any tests are run after this test, as seen in https://github.com/bilby-dev/bilby/pull/42. I've changed these test to patch the logger instead.

mj-will commented 4 days ago

Great catch! I think we should audit our use of mock and see how much of it we can remove.

Yeah, I agree. From a quick look, I think some of it definitely can't be removed (and is probably correct usage of mock)

jacobgolomb commented 4 days ago

I'll rebase the branch in #42 after this is merged.