Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix[test]: fix test in grammar fuzzer #4150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Jun 14, 2024

What I did

fix a failing test run in https://github.com/vyperlang/vyper/actions/runs/9503241643/job/26193257852 (copy paste of the error below):

=========================== short test summary info ============================
FAILED tests/functional/grammar/test_grammar.py::test_grammar_bruteforce - IndexError: list index out of range
Falsifying example: test_grammar_bruteforce(
    code='"""\r""" \n""""""',
)

You can reproduce this example by temporarily adding @reproduce_failure('6.103.1', b'AXicY+RnYGD0BWJGRgY4AAAGWwBi') as a decorator on your test case
============ 1 failed, 734 passed, 8 warnings in 192.85s (0:03:12) =============
Error: Process completed with exit code 1.

How I did it

How to verify it

Commit message

hypothesis `6.103.1` generates examples like

``` code='"""\r"""
\n""""""'
```

which trivially raise an exception in asttokens. filter out `\r`
characters when generating source codes.

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

hypothesis `6.103.1` generates examples like
```
code='"""\r""" \n""""""'
```
which raise an exception in asttokens. filter out `\r` characters when
generating source codes.
@charles-cooper charles-cooper marked this pull request as ready for review June 14, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants