diff --git a/tests/test_parse.py b/tests/test_parse.py index ce6f21b..4a79ff9 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -22,9 +22,9 @@ from src.syntax import Syntax, SyntaxStream, SyntaxType from tests.test_syntax import ( draw_token_bool, + draw_token_by_value, draw_token_classified, draw_syntax_random, - draw_syntax_location, draw_syntax_token, ) @@ -79,14 +79,6 @@ return token -# Draws a token with a specific value but random location -@composite -def draw_token_by_value(draw, value): - location = draw(draw_syntax_location()) - type = SyntaxType.TOKEN - return Syntax(value, location, type) - - # Draws tokens to make a valid text string and its value @composite def draw_syntax_text_valid(draw): diff --git a/tests/test_syntax.py b/tests/test_syntax.py index db09eff..ea20531 100644 --- a/tests/test_syntax.py +++ b/tests/test_syntax.py @@ -84,6 +84,14 @@ return Syntax(value, location, SyntaxType.TOKEN) +# Draws a token with a specific value but random location +@composite +def draw_token_by_value(draw, value): + location = draw(draw_syntax_location()) + type = SyntaxType.TOKEN + return Syntax(value, location, type) + + # Values considered spaces valid_spaces = [ "\t", # U+0009 HORIZONTAL TAB