[Refactor] Refactor logger hook unit tests (#797)
* Enhance config * add unit test data * reafactor unittest of loggerhook * fix rebase error * Fix permission error in windows * Fix CI * Fix windows ci * Fix windows ci * Fix windows ci * Fix windows CI * Apply suggestions from code review Co-authored-by:Qian Zhao <112053249+C1rN09@users.noreply.github.com> * clean the code * Refine as comment * Refine error rasing * Update mmengine/hooks/logger_hook.py Co-authored-by:
Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> * replace assert_called_with with assert_has_calls * Fix as comment * Do not remove filehandler and fix unit test --------- Co-authored-by:
Qian Zhao <112053249+C1rN09@users.noreply.github.com> Co-authored-by:
Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Showing
- mmengine/hooks/logger_hook.py 40 additions, 11 deletionsmmengine/hooks/logger_hook.py
- tests/data/config/py_config/test_custom_class.py 5 additions, 0 deletionstests/data/config/py_config/test_custom_class.py
- tests/test_hooks/test_logger_hook.py 112 additions, 94 deletionstests/test_hooks/test_logger_hook.py
Loading
Please register or sign in to comment