oracletrace
oracletrace copied to clipboard
[Tests]: Add unit tests for compare.py
Summary
Add focused unit tests for oracletrace/compare.py to ensure regression classification and edge cases are correct.
Problem
Compare logic lacks direct unit test coverage; bugs can slip in (--only-regressions, old_time == 0, etc.).
Proposed Solution
Add tests covering:
- regression (slower)
- improvement (faster)
- unchanged
- new function
- removed function
- edge case:
old_time == 0
Acceptance Criteria
- Tests cover the cases above with clear fixtures
- Tests run fast and deterministically
Affected Files
oracletrace/compare.pytests/
I'll do this
Thx @waldo121
For clarity, when we talk about a regression do we talk about:
- the sample script's total execution time has gone up or
- a given function which total execution time has gone up
I think we are talking about a given function