@pytest.fixture(scope='session')
def qnam(qapp):
 from PyQt5.QtNetwork import QNetworkAccessManager
 nam = QNetworkAccessManager()
 nam.setNetworkAccessible(QNetworkAccessManager.NotAccessible)
 return nam

@ pytest . fixture ( scope = 'session' ) def qnam ( qapp ) : from PyQt5 . QtNetwork import QNetworkAccessManager nam = QNetworkAccessManager ( ) nam . setNetworkAccessible ( QNetworkAccessManager . NotAccessible ) return nam
session-wide qnetworkaccessmanager .