##// END OF EJS Templates
Adding test for absence of default value validation for elements
Sylvain Corlay -
Show More
@@ -972,6 +972,19 b' class TestList(TraitTestBase):'
972 class Foo(object):
972 class Foo(object):
973 pass
973 pass
974
974
975 class NoneInstanceListTrait(HasTraits):
976
977 value = List(Instance(Foo, allow_none=False))
978
979 class TestNoneInstanceList(TraitTestBase):
980
981 obj = NoneInstanceListTrait()
982
983 _default_value = []
984 _good_values = [[Foo(), Foo()], []]
985 _bad_values = [[None], [Foo(), None]]
986
987
975 class InstanceListTrait(HasTraits):
988 class InstanceListTrait(HasTraits):
976
989
977 value = List(Instance(__name__+'.Foo'))
990 value = List(Instance(__name__+'.Foo'))
General Comments 0
You need to be logged in to leave comments. Login now