From b283aa418a1c0016a63a328fec6259dfe110cefe Mon Sep 17 00:00:00 2001 From: Brianna Rainey Date: Thu, 29 Jan 2026 16:30:43 -0500 Subject: fix `settings.ini` not located in correct path --- tests/test_mainwindow_projects.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/test_mainwindow_projects.py') diff --git a/tests/test_mainwindow_projects.py b/tests/test_mainwindow_projects.py index 8ad491a..6b49799 100644 --- a/tests/test_mainwindow_projects.py +++ b/tests/test_mainwindow_projects.py @@ -1,3 +1,5 @@ +from PyQt6 import QtCore +import os from pytest import fixture from pytestqt import qtbot from . import getTestDataPath, window @@ -8,9 +10,17 @@ def test_mainwindow_clear(qtbot, window): assert len(window.core.selectedComponents) == 0 +def test_mainwindow_presetDir_in_tests(qtbot, window): + # FIXME presetDir gets set to projectDir for some reason + assert ( + os.path.basename(os.path.dirname(window.core.settings.value("presetDir"))) + == "config" + ) + + def test_mainwindow_openProject(qtbot, window): """Open testproject.avp using MainWindow.openProject()""" - window.openProject(getTestDataPath("projects/testproject.avp"), prompt=False) + window.openProject(getTestDataPath("config/projects/testproject.avp"), prompt=False) assert len(window.core.selectedComponents) == 2 -- cgit v1.2.3