(self)
| 45 | self.verify_custom_handler_state(handler_1) |
| 46 | |
| 47 | def test_decorator_flush(self): |
| 48 | handler_0 = CustomOutput() |
| 49 | handler_1 = CustomOutput() |
| 50 | |
| 51 | @track_emissions( |
| 52 | project_name=self.project_name, |
| 53 | save_to_logger=True, |
| 54 | output_handlers=[handler_0, handler_1], |
| 55 | api_call_interval=1, |
| 56 | ) |
| 57 | def dummy_train_model(): |
| 58 | heavy_computation(run_time_secs=1) |
| 59 | return 42 |
| 60 | |
| 61 | dummy_train_model() |
| 62 | self.verify_custom_handler_state(handler_0) |
| 63 | self.verify_custom_handler_state(handler_1) |
| 64 | |
| 65 | def verify_custom_handler_state( |
| 66 | self, handler: CustomOutput, expected_lines=1 |
nothing calls this directly
no test coverage detected