fix for win

This commit is contained in:
Will McGugan
2022-12-21 15:43:29 +00:00
parent 14953cd1db
commit 6c5ba82bff
2 changed files with 5 additions and 2 deletions

View File

@@ -191,10 +191,9 @@ def pytest_terminal_summary(
console = Console(legacy_windows=False, force_terminal=True) console = Console(legacy_windows=False, force_terminal=True)
if diffs: if diffs:
snapshot_report_location = config._textual_snapshot_html_report snapshot_report_location = config._textual_snapshot_html_report
console.rule("[b red]Textual Snapshot Report", style="red") console.print("[b red]Textual Snapshot Report", style="red")
console.print( console.print(
f"\n[black on red]{len(diffs)} mismatched snapshots[/]\n" f"\n[black on red]{len(diffs)} mismatched snapshots[/]\n"
f"\n[b]View the [link=file://{snapshot_report_location}]failure report[/].\n" f"\n[b]View the [link=file://{snapshot_report_location}]failure report[/].\n"
) )
console.print(f"[dim]{snapshot_report_location}\n") console.print(f"[dim]{snapshot_report_location}\n")
console.rule(style="red")

View File

@@ -37,10 +37,14 @@ async def test_character_bindings():
app = BindApp() app = BindApp()
async with app.run_test() as pilot: async with app.run_test() as pilot:
await pilot.press(".") await pilot.press(".")
await pilot.pause()
assert counter == 1 assert counter == 1
await pilot.press("~") await pilot.press("~")
await pilot.pause()
assert counter == 2 assert counter == 2
await pilot.press(" ") await pilot.press(" ")
await pilot.pause()
assert counter == 3 assert counter == 3
await pilot.press("x") await pilot.press("x")
await pilot.pause()
assert counter == 3 assert counter == 3