Set up test fixtures.
(self)
| 19 | """Test suite for CPU and RAM utilization tracking features.""" |
| 20 | |
| 21 | def setUp(self) -> None: |
| 22 | """Set up test fixtures.""" |
| 23 | import tempfile |
| 24 | |
| 25 | self.temp_dir = tempfile.TemporaryDirectory() |
| 26 | self.temp_path = Path(self.temp_dir.name) |
| 27 | self.emissions_file_path = self.temp_path / "emissions.csv" |
| 28 | |
| 29 | # Patch config file access |
| 30 | patcher = mock.patch( |
| 31 | "builtins.open", new_callable=get_custom_mock_open(empty_conf, empty_conf) |
| 32 | ) |
| 33 | self.addCleanup(patcher.stop) |
| 34 | patcher.start() |
| 35 | |
| 36 | def tearDown(self) -> None: |
| 37 | """Clean up test fixtures.""" |
nothing calls this directly
no test coverage detected