os.makedirs()

This commit is contained in:
Adam Wilson
2025-08-18 21:30:15 -06:00
parent 368c9e68fb
commit a238893375
@@ -24,8 +24,13 @@ class TestRunLoggingService(AbstractTestRunLoggingService):
timestamp = calendar.timegm(time.gmtime())
base_path = os.environ.get('TEST_RUNS', '.')
self.log_file_path = os.path.join(base_path, str(f"test_{test_id}/{str(model_id.value).replace("/", "_")}/{start}_{end}/test_{str(test_id).lower()}_logs_{timestamp}.json").lower())
# Ensure directory structure exists
os.makedirs(os.path.dirname(self.log_file_path), exist_ok=True)
self._ensure_log_file_exists()
def _ensure_log_file_exists(self):
if not os.path.exists(self.log_file_path):
with open(self.log_file_path, 'w') as f: