came prepared for setitem tests
authorgwen <gremond@cadoles.com>
Sun, 8 Jul 2012 19:15:59 +0000 (21:15 +0200)
committergwen <gremond@cadoles.com>
Sun, 8 Jul 2012 19:15:59 +0000 (21:15 +0200)
test/test_option_setting.py

index c7b7459..01f8859 100644 (file)
@@ -50,6 +50,16 @@ def test_attribute_access_with_multi():
     config.string = ["foo", "bar"]
     assert config.string == ["foo", "bar"]
 
+def test_item_access_with_multi():
+    s = StrOption("string", "", default=["string"], multi=True)
+    descr = OptionDescription("options", "", [s])
+    config = Config(descr)
+    config.string = ["foo", "bar"]
+    assert config.string == ["foo", "bar"]
+    config.string[0] = 'changetest'
+    assert config.string[0] == 'changetest'
+#    assert config.string[
+
 #def test_attribute_access_with_multi2():
 #    s = StrOption("string", "", default="string", multi=True)
 #    descr = OptionDescription("options", "", [s])