mirror of
https://github.com/1j01/textual-paint.git
synced 2024-09-11 15:56:03 +03:00
Get file dialog snapshot tests passing on Windows
Now it's just a few round trip tests failing, and maybe a flaky snapshot test for the character selector dialog.
This commit is contained in:
parent
8cd164bb37
commit
b6e2c245a2
@ -11,6 +11,7 @@ from textual.widgets._directory_tree import DirEntry
|
||||
from textual.widgets._tree import TOGGLE_STYLE, TreeNode
|
||||
|
||||
# from textual_paint.args import args
|
||||
from textual_paint.__init__ import PYTEST
|
||||
from textual_paint.ascii_mode import replace
|
||||
|
||||
# Vague skeuomorphism
|
||||
@ -188,6 +189,12 @@ class EnhancedDirectoryTree(DirectoryTree):
|
||||
A Rich Text object containing the label.
|
||||
"""
|
||||
node_label = node._label.copy() # type: ignore
|
||||
|
||||
if PYTEST and node_label.plain == "\\":
|
||||
# Normalize root node display for cross-platform snapshot testing.
|
||||
# (Setting pyfakefs's fs.os = OSType.LINUX caused bigger problems.)
|
||||
node_label.plain = "/"
|
||||
|
||||
node_label.stylize(style)
|
||||
|
||||
if node._allow_expand: # type: ignore
|
||||
|
Loading…
Reference in New Issue
Block a user