Skip to content

Commit

Permalink
feat: log in run_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Co1lin committed Nov 14, 2024
1 parent 9d45ed9 commit f4af08d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cweval/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ def run_tests(
timeout_per_test: float = 3,
args: List[str] = ['-k', 'not _unsafe'],
) -> List[TestFileResult]:
print(f'Start running tests in {test_path = }', flush=True)
result_collector = TestResultCollector(timeout_per_test=timeout_per_test)
pytest.main([test_path, '--tb=short', *args], plugins=[result_collector])
print(f'Finished running tests in {test_path = }', flush=True)
return list(result_collector.file_results.values())


Expand Down

0 comments on commit f4af08d

Please sign in to comment.