| 1699 | |
| 1700 | |
| 1701 | class TestInstanceList(TraitTestBase): |
| 1702 | obj = InstanceListTrait() |
| 1703 | |
| 1704 | def test_klass(self): |
| 1705 | """Test that the instance klass is properly assigned.""" |
| 1706 | self.assertIs(self.obj.traits()["value"]._trait.klass, Foo) |
| 1707 | |
| 1708 | _default_value: t.List[t.Any] = [] |
| 1709 | _good_values = [[Foo(), Foo()], []] |
| 1710 | _bad_values = [ |
| 1711 | [ |
| 1712 | "1", |
| 1713 | 2, |
| 1714 | ], |
| 1715 | "1", |
| 1716 | [Foo], |
| 1717 | None, |
| 1718 | ] |
| 1719 | |
| 1720 | |
| 1721 | class UnionListTrait(HasTraits): |
nothing calls this directly
no test coverage detected
searching dependent graphs…