def test_unset_organization(qapp, orgname, expected): """Test unset_organization. Args: orgname: The organizationName to set initially. expected: The organizationName which is expected when reading back. """ qapp.setOrganizationName(orgname) assert qapp.organizationName() == expected # sanity check with standarddir._unset_organization(): assert qapp.organizationName() == '' assert qapp.organizationName() == expected
def test_unset_organization(qapp, orgname, expected): """Test unset_organization. Args: orgname: The organizationName to set initially. expected: The organizationName which is expected when reading back. """ qapp.setOrganizationName(orgname) assert qapp.organizationName() == expected # sanity check with standarddir._unset_organization(): assert qapp.organizationName() == '' assert qapp.organizationName() == expected
def test_unset_organization_no_qapp(monkeypatch): """Without a QApplication, _unset_organization should do nothing.""" monkeypatch.setattr(standarddir.QApplication, 'instance', lambda: None) with standarddir._unset_organization(): pass
def test_unset_organization_no_qapp(monkeypatch): """Without a QApplication, _unset_organization should do nothing.""" monkeypatch.setattr(standarddir.QApplication, 'instance', lambda: None) with standarddir._unset_organization(): pass