diff --git a/tests/parse/templates.py b/tests/parse/templates.py index 4ce119b..1ba0283 100644 --- a/tests/parse/templates.py +++ b/tests/parse/templates.py @@ -54,24 +54,6 @@ # Deprecated: Do not use -# Tests that something parses correctly -# We expect the following behaviour: -# - The decoration supplies a generator for test data and expected output -# - The decorated function is unused -# - Only the supplied tokens are parsed -# - The supplied tokens parse to the expected value -# - The Token's value is the expected value -# - The Token's location is the first token's location -def template_parse_valid(parser, draw): - @given(draw) - def do(test_data): - (tokens, expected) = test_data - return template_test_valid(parser, tokens, expected) - - return lambda func: do - - -# Deprecated: Do not use # Tests that something parses correctly with a custom parser # We expect the following behaviour: # - The decorated function supplies a parser, test data and expected data @@ -89,30 +71,6 @@ # Deprecated: Do not use -# Test that something parses incorrectly -# We expect the following behaviour: -# - The decoration supplies a parser function -# - The decorated function takes a parse context -# - The decorated function generates input tokens and an error -# - Parsing causes an error -# - The parse error is as expected -def template_parse_invalid(parser): - # Wrapper to add parse_context to our test_data - @composite - def wrapper(draw, func): - context = static_parse_context() - (tokens, error) = draw(composite(func)(context)) - return (tokens, error, context) - - # test_data is the output of wrapper - def do(test_data): - (tokens, error, context) = test_data - return template_test_invalid(parser, context, tokens, error) - - return lambda func: given(wrapper(func))(do) - - -# Deprecated: Do not use # Test that something parses incorrectly with a custom parser # We expect the following behaviour: # - The decorated function takes a parse context