Skip to content

Commit 82fe823

Browse files
committed
wip
1 parent 44e3c9c commit 82fe823

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/build-and-test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ jobs:
7777
shell: bash
7878
run: |
7979
choco install autohotkey.portable ffmpeg
80+
- if: matrix.os == 'windows-latest'
81+
name: Check languages
82+
shell: pwsh
83+
run: |
84+
Get-WinUserLanguageList
8085
- if: matrix.os == 'windows-latest'
8186
name: Install Mesa
8287
shell: cmd

tests/src/test_rendering.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_screen_manager():
6464
return HostScreenManager()
6565

6666

67-
def set_keyboard_layout(lang):
67+
def set_keyboard_layout_linux(lang):
6868
# Run "setxkbmap <lang> -print | xkbcomp - $DISPLAY"
6969
setxkbmap_process = subprocess.Popen(
7070
["setxkbmap", lang, "-print"],
@@ -90,6 +90,17 @@ def set_keyboard_layout(lang):
9090
print(f"Success: {output}")
9191

9292

93+
def set_keyboard_layout_win32(lang):
94+
print(lang)
95+
96+
97+
def set_keyboard_layout(lang):
98+
if sys.platform == "win32":
99+
return set_keyboard_layout_win32(lang)
100+
else:
101+
return set_keyboard_layout_linux(lang)
102+
103+
93104
@pytest.fixture(scope="session", autouse=True)
94105
def screen_manager():
95106
with get_screen_manager() as _:
@@ -104,7 +115,7 @@ def screen_manager():
104115
dummy = subprocess.Popen(["xlogo"])
105116
time.sleep(0.5)
106117

107-
set_keyboard_layout("pl")
118+
set_keyboard_layout("pl")
108119

109120
yield
110121

0 commit comments

Comments
 (0)