covr
covr copied to clipboard
Feature Enhancement: Minimize duplicated recorded tests
Closes #528
Refer to #528 for a detailed description of the issue, but in short the heuristic that was used for quickly determining whether we're evaluating a new test ended up being too specific, resulting in the same test being logged many times.
Generally this isn't an issue. Even in situations where a test suite might loop over a test, the heuristic would usually treat those as the same test. Even if it was logged with each iteration, those iteration counts are usually low enough that it doesn't impact the coverage object substantially. However, when testing fastmap
, there were a couple cases where an expectation is made in a loop with 10s of thousands of iterations and logging the test with each evaluation, blowing up the coverage object memory needs.
To emphasize, these changes will only affect behaviors when options(covr.record_tests = TRUE)
, which must be opted into.
Technical details annotated as in-line comments below: