guppylang icon indicating copy to clipboard operation
guppylang copied to clipboard

Snapshot error when parallelizing tests

Open ss2165 opened this issue 5 months ago • 2 comments

python_err.py fails with

E       AssertionError: value does not match the expected value in snapshot tests/error/comptime_expr_errors/python_err.err
E         (run pytest with --snapshot-update to update snapshots)
E       assert 'Error: Pytho...vious error\n' == 'Error: Pytho...vious error\n'
E         
E         Skipping 291 identical leading characters in diff, use -v to show
E            <module>
E         +     import sys;exec(eval(sys.stdin.readline()))
E         +     ^^^^^
E           ZeroDivisionError: division by zero
E           
E           Guppy compilation failed due to 1 previous error

when running just test (uv run pytest -n auto -x)

Appears to be a problem with parallel testing

ss2165 avatar Aug 04 '25 15:08 ss2165

Looks to be Python 3.13 specific: https://github.com/pytest-dev/pytest/blob/f3da9187d0b7c2b0a1131ba4002cc55fda34bd5c/testing/code/test_excinfo.py#L379-L381

mark-koch avatar Aug 04 '25 15:08 mark-koch

Still happening in 3.14

ss2165 avatar Oct 23 '25 13:10 ss2165