Skip to content

Commit b67b2bf

Browse files
committed
wip
1 parent 44e3c9c commit b67b2bf

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

tests/src/test_rendering.py

+7-14
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,12 @@ def run_process_capture_logs(command, cwd, name="", process_holder=None) -> None
158158
process.wait()
159159

160160

161-
def run_typing_process(workdir, text: str) -> None:
161+
def run_typing_process(text: str) -> None:
162162
if sys.platform == "win32":
163-
# with open(workdir / "type.ahk", "w", encoding="utf-8") as f:
164-
# f.write("SetKeyDelay 400, 100\n") # 400ms between keys, 100ms between down/up.
165-
# f.write(f"SendEvent \"{text}\"\n")
166-
# f.write("exit")
167-
# result = subprocess.run(["AutoHotkey.exe", "/ErrorStdOut", "type.ahk"], cwd=workdir)
168163
ahk.send(text, key_delay=400, send_mode="Event");
169164
else:
170165
result = subprocess.run(["xdotool", "type", "--delay", "400", text])
171-
#logger.info(f"stdout: {result.stdout}")
172-
#logger.info(f"stderr: {result.stderr}")
173-
#assert result.returncode == 0
166+
assert result.returncode == 0
174167

175168

176169
def __get_parameters():
@@ -190,10 +183,10 @@ def __get_parameters():
190183

191184
test_params.append(pytest.param(texts[0], examples[0]))
192185
test_params.append(pytest.param(texts[1], examples[0]))
193-
#test_params.append(pytest.param(texts[0], examples[1]))
194-
#test_params.append(pytest.param(texts[0], examples[2]))
195-
#test_params.append(pytest.param(texts[0], examples[3]))
196-
#test_params.append(pytest.param(texts[1], examples[4]))
186+
test_params.append(pytest.param(texts[0], examples[1]))
187+
test_params.append(pytest.param(texts[0], examples[2]))
188+
test_params.append(pytest.param(texts[0], examples[3]))
189+
test_params.append(pytest.param(texts[1], examples[4]))
197190

198191
return test_params
199192

@@ -213,7 +206,7 @@ def test_record_and_render(app_isolation, text: str, example) -> None:
213206
thread.start()
214207
time.sleep(2)
215208

216-
run_typing_process(app_dir, text)
209+
run_typing_process(text)
217210

218211
process = processes.get("klawa")
219212
if process and process.poll() is None:

0 commit comments

Comments
 (0)