textual: Failing snapshot tests with `pytest tests/snapshot_tests/test_snapshots.py`?
This is weird issue that has been bugging me for a couple of weeks. Despite everything passing when I run all tests with make test, when I try running only the snapshot tests this results in failing tests relating to the command palette.
Can anyone else reproduce this?
------------------------- snapshot report summary --------------------------
2 snapshots failed. 293 snapshots passed.
========================= short test summary info ==========================
FAILED tests/snapshot_tests/test_snapshots.py::test_command_palette - AssertionError: assert False
FAILED tests/snapshot_tests/test_snapshots.py::test_command_palette_discovery - AssertionError: assert False
=========== 2 failed, 293 passed, 1 warning in 88.05s (0:01:28) ===========
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (16 by maintainers)
It looks like these snapshots were updated recently in dd13211, now running only the snapshot tests doesn’t have this issue!
I’ll leave it up to you whether you want to close this issue or try to investigate why this was happening.
@TomJGooding This is still an issue, but if you run the tests with
make testnow, it’ll distribute the tests across processes and is MUCH faster, so it makes this issue a little less painful. There’s alsomake test-snapshot-update.There is a very curious line here… https://github.com/Textualize/textual/blob/main/src/textual/command.py#L389
Seems relevant