mkorpela/RoboMachine

Tests fail with pyparsing >= 3

Opened this issue · 2 comments

RoboMachine fails to build in https://github.com/nixos/nixpkgs ever since pyparsing was upgraded from 2.4.7 to 3.0.6 (due to some tests failing):

[...]
ERROR: test_generate_random_with_variable_resolving_problem (robomachine.test.robomachina_test.TestTestGeneration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/RoboMachine-0.9.0/robomachine/parsing.py", line 216, in parse
    return machine.parseString(resolve_whitespace(text), parseAll=True)[0]
  File "/nix/store/rv3dbmbbb7h9x1rs488fq4d2d0p9cngg-python3.9-pyparsing-3.0.6/lib/python3.9/site-packages/pyparsing/core.py", line 1127, in parse_string
    raise exc.with_traceback(None)
pyparsing.exceptions.ParseException: Expected {Re:(' *\n') ^ LineEnd}, found '$'  (at char 16), (line:2, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/build/RoboMachine-0.9.0/robomachine/test/robomachina_test.py", line 271, in test_generate_random_with_variable_resolving_problem
    m = robomachine.parse(_VAR_PROBLEM_MACHINE)
  File "/build/RoboMachine-0.9.0/robomachine/parsing.py", line 221, in parse
    raise RoboMachineParsingException(pe.msg)
robomachine.parsing.RoboMachineParsingException: Expected {Re:(' *\n') ^ LineEnd}

----------------------------------------------------------------------
Ran 72 tests in 0.659s

FAILED (errors=10)
Test failed: <unittest.runner.TextTestResult run=72 errors=10 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=72 errors=10 failures=0>
builder for '/nix/store/hlp1hwf16nbnjvr5vdx03b497kq7xijj-python3.9-RoboMachine-0.9.0.drv' failed with exit code 1

@mkorpela: Do you accept PRs? (If you say yes I might add this on my TODO.)

Yes.