()
| 2601 | |
| 2602 | |
| 2603 | def test_enum_no_default(): |
| 2604 | class C(HasTraits): |
| 2605 | t = Enum(["a", "b"]) |
| 2606 | |
| 2607 | c = C() |
| 2608 | c.t = "a" |
| 2609 | assert c.t == "a" |
| 2610 | |
| 2611 | c = C() |
| 2612 | |
| 2613 | with pytest.raises(TraitError): |
| 2614 | t = c.t |
| 2615 | |
| 2616 | c = C(t="b") |
| 2617 | assert c.t == "b" |
| 2618 | |
| 2619 | |
| 2620 | def test_default_value_repr(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…