Fixing tests and LaTeX
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adsooi 2024-10-11 22:33:57 +02:00
parent e2d259f866
commit 42d5add810
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
6 changed files with 35 additions and 30 deletions

View file

@ -31,7 +31,7 @@ latex.SHOW_GUI_MESSAGES = False
@pytest.fixture()
def latex_obj():
directory = TemporaryDirectory()
obj = latex.Latex(directory)
obj = latex.Latex(directory.name)
if not obj.checkLatexInstallation():
raise Exception("Cannot run LaTeX tests without a proper LaTeX installation. Make sure to install a LaTeX distribution, DVIPNG, and the calligra package, and run the tests again.")
yield obj

View file

@ -39,11 +39,10 @@ THEMES = [
]
OS_PLATFORMS = [
"linux",
"freebsd",
"win32",
"cygwin",
"darwin"
"Linux",
"Windows",
"Darwin",
"Android"
]
@pytest.fixture()
@ -91,7 +90,7 @@ class TestMain:
# Engine
tmpfile, tempdir = temporary
helper = Helper(".", tmpfile)
latex = Latex(tempdir)
latex = Latex(tempdir.name)
engine, js_globals = create_engine(helper, latex, 0)
assert len(engine.rootObjects()) > 0 # QML File loaded.
assert type(engine.rootContext().contextProperty("TestBuild")) is bool

View file

@ -60,7 +60,7 @@ def test_update(qtbot):
def test_update_checker(qtbot):
update_info = check_for_updates('0.6.0', MockWindow())
assert QThreadPool.globalInstance().activeThreadCount() == 1
assert QThreadPool.globalInstance().activeThreadCount() >= 1
qtbot.waitSignal(update_info.got_update_info, timeout=10000)
argv.append("--no-check-for-updates")
update_info = check_for_updates('0.6.0', MockWindow())