Add test coverage of modified widgets

This commit is contained in:
Veronica Berglyd Olsen
2024-02-01 23:35:30 +01:00
parent a8f61f2b98
commit 68a6390868
2 changed files with 153 additions and 1 deletions
+21 -1
View File
@@ -25,7 +25,7 @@ import shutil
from pathlib import Path
from datetime import datetime
from PyQt5.QtWidgets import qApp
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QWidget, qApp
XML_IGNORE = ("<novelWriterXML", "<project")
ODT_IGNORE = ("<meta:generator", "<meta:creation-date", "<dc:date", "<meta:editing")
@@ -214,3 +214,23 @@ def buildTestProject(obj: object, projPath: Path) -> None:
nwGUI.rebuildTrees()
return
class SimpleDialog(QDialog):
def __init__(self, widget: QWidget) -> None:
super().__init__()
self._widget = widget
layout = QVBoxLayout()
layout.addWidget(widget)
layout.setContentsMargins(40, 40, 40, 40)
self.setLayout(layout)
return
@property
def widget(self) -> QWidget:
return self._widget
# END Class TestDialog