came prepared for setitem tests

This commit is contained in:
gwen 2012-07-08 21:15:59 +02:00
parent 13c4819b14
commit b008f31e27

View 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])