from pathlib import Path import time import pytest from PySide6.QtCore import QSettings from mdhelper import main_window from mdhelper.markdown_editor import MarkdownEditorDialog from mdhelper.tab_controller import document_path from mdhelper.workspace_state import TabState, WorkspaceStore def wait_until(app, condition): deadline=time.monotonic()+10 while not condition() and time.monotonic()