##// END OF EJS Templates
adding a test
Sylvain Corlay -
Show More
@@ -1079,6 +1079,19 b' def test_dict_assignment():'
1079 nt.assert_equal(d, c.value)
1079 nt.assert_equal(d, c.value)
1080 nt.assert_true(c.value is d)
1080 nt.assert_true(c.value is d)
1081
1081
1082 class ValidatedDictTrait(HasTraits):
1083
1084 value = Dict(Unicode())
1085
1086 class TestInstanceDict(TraitTestBase):
1087
1088 obj = ValidatedDictTrait()
1089
1090 _default_value = {}
1091 _good_values = [{'0': 'foo'}, {'1': 'bar'}]
1092 _bad_values = [{'0': 0}, {'1': 1}]
1093
1094
1082 def test_dict_default_value():
1095 def test_dict_default_value():
1083 """Check that the `{}` default value of the Dict traitlet constructor is
1096 """Check that the `{}` default value of the Dict traitlet constructor is
1084 actually copied."""
1097 actually copied."""
General Comments 0
You need to be logged in to leave comments. Login now