Beispiel #1
0
 def test_radio_setting_multi(self):
     val1 = settings.RadioSettingValueBoolean(True)
     val2 = settings.RadioSettingValueBoolean(False)
     rs = settings.RadioSetting("foo", "Foo", val1, val2)
     self.assertEqual(rs[0], val1)
     self.assertEqual(rs[1], val2)
     rs[0] = False
     rs[1] = True
     self.assertEqual(val1.get_value(), False)
     self.assertEqual(val2.get_value(), True)
Beispiel #2
0
 def test_changed(self):
     value = settings.RadioSettingValueBoolean(False)
     self.assertFalse(value.changed())
     value.set_value(False)
     self.assertFalse(value.changed())
     value.set_value(True)
     self.assertTrue(value.changed())
Beispiel #3
0
 def test_radio_setting_value_boolean(self):
     value = settings.RadioSettingValueBoolean(True)
     self.assertTrue(value.get_value())
     self._set_and_test(value, True, False)
Beispiel #4
0
 def test_radio_setting(self):
     val = settings.RadioSettingValueBoolean(True)
     rs = settings.RadioSetting("foo", "Foo", val)
     self.assertEqual(rs.value, val)
     rs.value = False
     self.assertEqual(val.get_value(), False)