Improve test_ast_parsing.py
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
One issue with our current parsing pytest is that it is not robust against new version of solc for the xfail tests. For example, these tests are not working with 0.7.1 and 0.7.2:
https://github.com/crytic/slither/blob/ae7c410938b616d993e6c27678f6e48d9a4d7dd6/tests/test_ast_parsing.py#L81-L82
And was not updated when 0.7.3/0.7.4 were released. So the tests fail, while the script should have expected to not support 0.7.3 and 0.7.4 for this test.
We should have two version of XFAIL: the ones that fail for a specific version, and the ones that fail from a version
Contributor guide
Research direction
Start with tests/test_ast_parsing.py, especially the xfail cases at lines 81–82, and run the parsing pytest against the affected solc versions. Separate expectations for failures tied to one specific version from failures that begin at a version, then verify the tests correctly handle the listed solc releases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, solidity
- Domain
- compilers, testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100