diff --git a/tests/test_parse.py b/tests/test_parse.py index 7a7408e..04c0567 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -18,9 +18,9 @@ # Test that we can make string literals using the BeginText and EndText syntax. -@given(text()) -def test_lexer_text(text): - code = "BeginText " + text + " EndText" +@given(text(), sampled_from("\n\t "), sampled_from("\n\t ")) +def test_lexer_text(text, space1, space2): + code = "BeginText" + space1 + text + space2 + "EndText" tokenizer = parse.Tokenizer(code, "") tokens = tokenizer.tokenize() assert tokens[0].type == "text" @@ -32,9 +32,9 @@ # Test that we can make notes using BeginNote and EndNote syntax. -@given(text()) -def test_lexer_note(text): - code = "BeginNote " + text + " EndNote" +@given(text(), sampled_from("\n\t "), sampled_from("\n\t ")) +def test_lexer_note(text, space1, space2): + code = "BeginNote" + space1 + text + space2 + "EndNote" tokenizer = parse.Tokenizer(code, "") tokens = tokenizer.tokenize() assert tokens[0].type == "EOF"