def test_ws():

    def grammar():     return ("one", "two", "three")

    parser = ParserPython(grammar)

    # With default ws this should parse without error
    parser.parse("""one
                  two   three""")

    # If we make only a space char to be ws than the
    # same input will raise exception.
    parser = ParserPython(grammar, ws=" ")
    with pytest.raises(NoMatch):
        parser.parse("""one
                  two   three""")

    # But if only spaces are between words than it will
    # parse.
    parser.parse("one two  three")
Callable version for use as a decorator
dataset/ETHPy150Open igordejanovic/Arpeggio/tests/unit/test_parser_params.py/test_ws--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/kazoo-2.0/kazoo/recipe/watchers.py/DataWatch.__call__