Skip to content

Commit

Permalink
Disable file path handling nuance test on non-windows
Browse files Browse the repository at this point in the history
fixes #644
  • Loading branch information
MyreMylar committed Nov 3, 2024
1 parent bb7ef80 commit 8416c06
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_windows/test_ui_file_dialog.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import platform
from pathlib import Path

import pygame
Expand Down Expand Up @@ -396,12 +397,13 @@ def test_process_event(self, default_ui_manager, _display_surface_return_none):

assert Path(file_dialog.current_directory_path).name == 'images'

file_dialog.file_path_text_line.set_text('/')
if platform.system().upper() == 'WINDOWS':
file_dialog.file_path_text_line.set_text('/')

file_dialog.process_event(pygame.event.Event(UI_TEXT_ENTRY_FINISHED,
{'ui_element': file_dialog.file_path_text_line}))
file_dialog.process_event(pygame.event.Event(UI_TEXT_ENTRY_FINISHED,
{'ui_element': file_dialog.file_path_text_line}))

assert Path(file_dialog.current_directory_path).name == ''
assert Path(file_dialog.current_directory_path).name == ''

def test_show(self, _init_pygame, default_ui_manager, _display_surface_return_none):
file_dialog = UIFileDialog(rect=pygame.Rect(100, 100, 440, 500),
Expand Down

0 comments on commit 8416c06

Please sign in to comment.