diff --git a/tests/test_parse.py b/tests/test_parse.py index 7f82442..cb85ab3 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -57,16 +57,6 @@ assert (syntax1 == syntax2) == equals -# Draws syntax imported from tokens -@composite -def draw_syntax_imported(draw): - input = draw(lists(test_tokenize.draw_token_random())) - tokens = [] - for t in input: - tokens.append(parse.Syntax(t, t.location, parse.SyntaxType.TOKEN)) - return (input, tokens) - - # Tests that a syntax stream reads items correctly # We expect the following behaviour: # - All items are popped in order @@ -83,6 +73,16 @@ assert stream.pop() is None +# Draws syntax imported from tokens +@composite +def draw_syntax_imported(draw): + input = draw(lists(test_tokenize.draw_token_random())) + tokens = [] + for t in input: + tokens.append(parse.Syntax(t, t.location, parse.SyntaxType.TOKEN)) + return (input, tokens) + + # Tests importing tokens works correctly # We expect the following behaviour: # - Each token is converted to a Syntax