def METHOD_NAME():
    preferences = Preferences()
    path = Resources.getPath(Resources.Preferences, "preferences_test.cfg")
    preferences.readFromFile(path)
    # Check if it has been loaded correctly
    assert preferences.getValue("general/foo") == "omgzomg"
    assert preferences.getValue("general/derp") == True
    # Write contents of the preference to a buffer
    in_memory_storage = StringIO()
    preferences.writeToFile(in_memory_storage)  # type: ignore
    new_preferences = Preferences()
    # For some reason, if write was used, the read doesn't work. If we do it like this, it does work.
    new_preferences.readFromFile(StringIO(in_memory_storage.getvalue()))
    assert preferences.getValue("general/foo") == new_preferences.getValue("general/foo")
    assert preferences.getValue("test/more_test") == new_preferences.getValue("test/more_test")