Ejemplo n.º 1
0
def test_removePreference(preference):
    preferences = Preferences()
    preferences.addPreference(preference["key"], preference["default"])
    preferences.removePreference(preference["key"])
    assert preferences.getValue(preference["key"]) is None
Ejemplo n.º 2
0
def test_removePreference(preference):
    preferences = Preferences()
    preferences.addPreference(preference["key"], preference["default"])
    preferences.removePreference(preference["key"])
    assert preferences.getValue(preference["key"]) is None
Ejemplo n.º 3
0
def test_nonExistingSetting():
    preferences = Preferences()
    # Test that attempting to modify a non existing setting in any way doesn't break things.
    preferences.setDefault("nonExistingPreference", "whatever")
    preferences.setValue("nonExistingPreference", "whatever")
    preferences.removePreference("nonExistingPreference")
Ejemplo n.º 4
0
def test_nonExistingSetting():
    preferences = Preferences()
    # Test that attempting to modify a non existing setting in any way doesn't break things.
    preferences.setDefault("nonExistingPreference", "whatever")
    preferences.setValue("nonExistingPreference", "whatever")
    preferences.removePreference("nonExistingPreference")