Check that the `{}` default value of the Dict traitlet constructor is actually copied.
()
| 1943 | |
| 1944 | |
| 1945 | def test_dict_default_value(): |
| 1946 | """Check that the `{}` default value of the Dict traitlet constructor is |
| 1947 | actually copied.""" |
| 1948 | |
| 1949 | class Foo(HasTraits): |
| 1950 | d1 = Dict() |
| 1951 | d2 = Dict() |
| 1952 | |
| 1953 | foo = Foo() |
| 1954 | assert foo.d1 == {} |
| 1955 | assert foo.d2 == {} |
| 1956 | assert foo.d1 is not foo.d2 |
| 1957 | |
| 1958 | |
| 1959 | class TestValidationHook(TestCase): |
nothing calls this directly
no test coverage detected
searching dependent graphs…