fix(fill): fix reported fixture source urls for the case of auto-generated tests #1488
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.
🗒️ Description
Fixes the
fixture_source_url
field in the fixture_info
section for the case of a test function who's body is simplypass
. Here's an example of such a test function, whose test logic is applied via a decorate from an EEST framework generator:execution-spec-tests/tests/prague/eip7251_consolidations/test_modified_consolidation_contract.py
Lines 137 to 151 in f330aac
In v4.3.0, consume test reports report an invalid URL (with a non-existent line number), e.g. https://hive.ethpandaops.io/#/test/pectra/1745242958-27275e8c3ce031d481359ddd1eb46b12?page=1&testnumber=4776
In these special cases, pytest reports the generator function as the test function, instead of the original test function. For this case, where the test module name doesn't match the module name reported by pytest, both files are written to the url string, e.g.,
This isn't perfect, I didn't find an easy way to get the test function's line number in this case.
🔗 Related Issues
None
✅ Checklist