Closed slyin87 closed 4 months ago
Hi @slyin87,
pytest-qt is meant to be when writing tests, not for normal production code.
Try using it in a test:
def test(qtmodeltester):
model = WorkNodeTreeModel()
qt_modeltester.check(model)
Of course, you will need pytest
and pytest-qt
installed.
Closing for now, feel free to follow up with more questions.
Hi,
I am using PySide6. I am not sure what I am doing. I want to do Model Test for my model. My code:
Then I faced this error. HAS_QT_TESTER = hasattr(qt_api.QtTest, "QAbstractItemModelTester") AttributeError: '_QtApi' object has no attribute 'QtTest'