Fixing LaTeX rendering on windows.

This commit is contained in:
Adsooi 2025-04-22 04:49:47 +02:00
parent 70333a4e41
commit 04e070058e
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
2 changed files with 5 additions and 7 deletions

View file

@ -47,7 +47,8 @@ def check_render_results(result):
result = result.toVariant()
assert type(result) == str
[path, width, height] = result.split(",")
assert exists(path)
assert path.startswith("file:///")
assert exists(path[len("file:///"):])
assert match(r"\d+", width)
assert match(r"\d+", height)
return True
@ -92,10 +93,7 @@ class TestLatex:
latex_obj.renderSync(*args)
prerendered = latex_obj.findPrerendered(*args)
assert type(prerendered) == str
[path, width, height] = prerendered.split(",")
assert exists(path)
assert match(r"\d+", width)
assert match(r"\d+", height)
check_render_results(prerendered)
prerendered2 = latex_obj.findPrerendered(args[0], args[1]+2, args[2])
assert prerendered2 == ""