The PR fixes a bug that is causing github markers to not be collected for test runs involving multiple test modules.
The github issue cache was being initialized from within the pytest_collectstart hook, which is invoked at least once for each collected test module. This caused the collection of github issues to be discarded multiple times during the test collection process.
Bug Details
Steps to Reproduce:
Make a test suite with at least two test modules
Add test functions with @pytest.mark.github markers to each module
invoke the test runner
Expected Results:
The test runner should report the total number of github markers added
Actual Results:
Only the github markers from one of the test modules will be collected
Coverage remained the same at 100.0% when pulling 9504ad8ff5c2a8c70a5482ffd8433486d20ed7df on jakemcdermott:fix_multiple_file_marker_collection into 04b5285f0000acb7b6bb45b1dde0b9650f90b221 on jlaska:master.
Summary
The PR fixes a bug that is causing github markers to not be collected for test runs involving multiple test modules.
The github issue cache was being initialized from within the
pytest_collectstart
hook, which is invoked at least once for each collected test module. This caused the collection of github issues to be discarded multiple times during the test collection process.Bug Details
Steps to Reproduce:
@pytest.mark.github
markers to each moduleExpected Results:
Actual Results: