From baedfb536899dad840ff43ecf842462dba6ab77a Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Tue, 26 Mar 2024 16:32:32 -0400 Subject: [PATCH] fix[test]: fix failure in grammar fuzzing (#3892) fixes a fuzz failure, which is that the strategy can put utf-8 characters in strings (which we reject at compile-time). the fix here is to just create programs with ascii. this bug was apparently introduced in 176e7f7f3a6a16bc09ec58d4bbc8dc515c48a0a8 due to the new alphabet parameter passed to the grammar strategy. --- tests/functional/grammar/test_grammar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/grammar/test_grammar.py b/tests/functional/grammar/test_grammar.py index 716986ffe4..de399e84b7 100644 --- a/tests/functional/grammar/test_grammar.py +++ b/tests/functional/grammar/test_grammar.py @@ -44,7 +44,7 @@ def fix_terminal(terminal: str) -> bool: return terminal -ALLOWED_CHARS = st.characters(codec="utf-8", min_codepoint=1) +ALLOWED_CHARS = st.characters(codec="ascii", min_codepoint=1) # With help from hyposmith