Skip to content

Commit

Permalink
Merge pull request #651 from MyreMylar/file-nuance-path-test
Browse files Browse the repository at this point in the history
Disable file path handling nuance test on non-windows
  • Loading branch information
MyreMylar authored Nov 3, 2024
2 parents 1734070 + 8416c06 commit c74b79e
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 c74b79e

Please sign in to comment.