FASLR
FASLR copied to clipboard
Segmentation fault when attempting to test FApplication
I've got the QApplication subclassed as FApplication:
from PyQt6.QtWidgets import (
QApplication
)
class FApplication(QApplication):
def __init__(
self,
*argv
):
super().__init__(*argv)
I'm able to run the following test when using a PyCharm context menu or when running the test alone in the terminal. But when I run the entire test suite using $pytest, I wind up with a segmentation fault.
import sys
import pytest
from faslr.core import FApplication
from pytestqt.qtbot import QtBot
@pytest.fixture(scope="session")
def f_application():
app = FApplication(sys.argv)
return app
def test_f_application(
qtbot: QtBot,
f_application: FApplication
) -> None:
app = f_application
Some things I've tried doing are adding a line to exit the application. Declaring the application via a fixture was suggested in this guide:
https://pytest-qt.readthedocs.io/en/latest/qapplication.html
picking this up @genedan