mirror of
https://github.com/1j01/textual-paint.git
synced 2024-11-24 08:44:45 +03:00
Merge snapshot results for ASCII-only and Unicode UI tests
I'm basically doing TDD to snapshot testing! I'm creating tests that don't pass yet, setting up an expectation that the app match the given screenshots, which is funny in a nice "improper hierarchy" sort of way, but it's possible because I do actually have the app rendering how I want, just only in isolation. If I run the ascii_only tests by themselves, I can get good results from them, but running them interwoven with default Unicode-using UI tests doesn't work yet, since the ASCII-only mode permanently changes how certain widgets render, for the life of the process, so that's what I'm applying TDD to: making it toggleable at runtime. I commented out the Unicode tests, and uncommented the ASCII-only tests, renamed test_snapshots.ambr to test_snapshots_ascii.ambr, reverted the changes to test_snapshots.ambr to get the Unicode version, ran my new merge_ambr.py script to join the sets of snapshots, then replaced test_snapshots.ambr with test_snapshots_merged.ambr Finally, I uncommented both sets of tests, and I'm ready to do TDD!
This commit is contained in:
parent
d49c144a96
commit
18c38fd3e0
File diff suppressed because one or more lines are too long
@ -27,8 +27,8 @@ LARGER = (81, 38)
|
||||
@pytest.fixture(params=[
|
||||
{"theme": "light", "ascii_only": False},
|
||||
{"theme": "dark", "ascii_only": False},
|
||||
# {"theme": "light", "ascii_only": True},
|
||||
# {"theme": "dark", "ascii_only": True},
|
||||
{"theme": "light", "ascii_only": True},
|
||||
{"theme": "dark", "ascii_only": True},
|
||||
], ids=lambda param: f"{param['theme']}_{'ascii' if param['ascii_only'] else 'unicode'}")
|
||||
def each_theme(request):
|
||||
"""Fixture to set the PYTEST_TEXTUAL_PAINT_ARGS environment variable."""
|
||||
|
Loading…
Reference in New Issue
Block a user