def test_non_optional_precedence():
    def grammar():  return Optional('a'), 'b'

    parser = ParserPython(grammar)

    try:
        parser.parse('c')

    except NoMatch as e:
        assert "Expected 'a' or 'b'" in str(e)

    def grammar():  return ['b', Optional('a')]

    parser = ParserPython(grammar)

    try:
        parser.parse('c')

    except NoMatch as e:
        assert "Expected 'b'" in str(e)
Yields the absolute path to the folder containing the app.
dataset/ETHPy150Open igordejanovic/Arpeggio/tests/unit/test_error_reporting.py/test_non_optional_precedence--crossover with--dataset/ETHPy150Open clips/pattern/pattern/server/__init__.py/Application.path