(self)
| 8 | |
| 9 | class TestLogManager(unittest.TestCase): |
| 10 | def setUp(self): |
| 11 | self.temp_dir = tempfile.TemporaryDirectory() |
| 12 | self.log_path = os.path.join(self.temp_dir.name, "test.log") |
| 13 | with open(self.log_path, "w") as f: |
| 14 | f.write("INFO Start\nWARN Something\nERROR FindMe\nDEBUG End\n") |
| 15 | |
| 16 | def tearDown(self): |
| 17 | self.temp_dir.cleanup() |