Closed Sigmanificient closed 1 month ago
These tests are fragile, and it's probably nothing to worry about, but it's hard to say anything for certain with only the output you've pasted. It's hard to even be sure that what failed is only the snapshot tests without seeing the "snapshot report summary" section of the pytest output, though we do have 21 snapshot tests and they are all in those two files, which makes it pretty likely that it is only the snapshot tests that failed.
What version of Textual are you using?
Here's what I can tell you without seeing the snapshot report:
pytest-textual-snapshot
render the snapshots, rather than any true regression.pytest-textual-snapshot < 1
but are expected to fail with pytest-textual-snapshot >= 1
. f6e4039a80ac57847956218bea6934c88208c1f7 flips that situation: after applying that commit, the snapshot tests should pass with pytest-textual-snapshot >= 1
, but fail with older versions. I see textual-snapshot-0.4.0
in your pytest output, so applying f6e4039a80ac57847956218bea6934c88208c1f7 is definitely not helpful to you.pytest
with --snapshot-update --snapshot-warn-unused
(setting them in the PYTEST_ADDOPTS
environment variable might be easiest) will cause the snapshots themselves to be ignored, but will still run the snapshot tests to make sure that they don't crash or deadlock or anything bad like that. It just skips the diff step at the end, and succeeds regardless of any differences (updating the snapshot files on disk to new versions).Wow thanks for the detailed explanations!
Using textual 0.72.0
& pytest-textual-snapshot 0.4.0
, so the patch should definitively be removed.
Nixpkgs have some restriction, so locking textual and pytest-textual-snapshot might be a bit complex. From my understanding, these tests can be turned off on our side without causing too much problem
Yeah, if you're stuck with Textual 0.72.0, I'd just run the tests with --snapshot-update --snapshot-warn-unused
and confirm that they pass that way. It won't actually be comparing the snapshots to make sure they match (since they won't), but it's good enough to prove there isn't something serious wrong, and pytest should exit with a good rcode.
When you run the test suite, how do you invoke it? We're wondering if there's a way to change the default behavior for you so that snapshot comparisons aren't run, while leaving them on for maintainers and CI.
We can disable test based on there name and path like so:
disabledTests = [
# Import issue
"test_header_allocator"
"test_hybrid_stack_of_allocations_inside_ceval"
# snapshot-based tests are too fragile
# see https://github.com/bloomberg/memray/issues/654
"TestTUILooks"
"test_tui_basic"
"test_tui_pause"
"test_tui_gradient"
"test_merge_threads"
"test_unmerge_threads"
];
Hi, nixpkgs (nixos package repository) contributer here. I am currently working on updating the memray package, as requested by on of our user:
However, in this process, I've encountered some failling tests:
I noticed the
Update textual-snapshot files to new format
commit, applied it on top of the1.13.4
release source, but it also fails:I am not sure what this means for memray usability (are those ttest critical?), so I am opening this issue to get more insight