pytest static analysis (a) suppress coverage warning for cv2, (b) remove one poor unit test. #312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use an improved approach to suppress cv2 coverage warning.
Previously, avoided nuisance warnings during static analysis with pytest
"coverage" reporting by suppressing the import of opencv-python during
pytest, using an environment variable setting that detectron2 honors.
With this PR, revert to normal import of cv2 (that is, opencv-python),
and use a better workaround to suppress the two coverage warnings, namely
filterwarnings via setting in pytest.ini.
Also pytest related,
remove John's misguided unit test which attempts to produce an
import-duration.
performing another test case earlier in the pytest session, if the
other test case loads libraries... which means this test case
doesn't lose time loading.
python's "-X importtime". This is a feature introduced in
Python 3.7.
Documented in new
LabGym/tests/Notes.importtime.txt