Remove main app testmode flag

This commit is contained in:
Veronica Berglyd Olsen
2025-01-12 03:16:52 +01:00
parent 27a0a47aaa
commit a1d94d63a3
3 changed files with 114 additions and 105 deletions
+8
View File
@@ -28,6 +28,8 @@ from pathlib import Path
from PyQt6.QtWidgets import QDialog, QVBoxLayout, QWidget
from novelwriter import logger
XML_IGNORE = ("<novelWriterXML", "<project")
ODT_IGNORE = ("<meta:generator", "<meta:creation-date", "<dc:date", "<meta:editing")
NWD_IGNORE = ("%%~date:",)
@@ -155,6 +157,12 @@ def cleanProject(path: str | Path):
return
def clearLogHandlers():
"""Clear all log handlers."""
for handler in logger.handlers:
logger.removeHandler(handler)
def buildTestProject(obj: object, projPath: Path) -> None:
"""Build a standard test project in projPath using the project
object as the parent.