Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
translate_span: Make assert more specific
Before this commit, the assert in translate_span would now allow for a duration_ms of `0`. This usually makes sense, but what the assert seems to actually be for, is to check whether duration_ms has been set (that is, somebody has run .finished() on the Span). This fixes the assert to check that duration_ms is not None, which has the nice side-effect that it allows for Spans to be created+finished in a unittest setting where freezegun.freeze_time() is activated.
- Loading branch information