(self)
| 656 | self.assertEqual(len(self._notify1), 0) |
| 657 | |
| 658 | def test_notify_one(self): |
| 659 | class A(HasTraits): |
| 660 | a = Int() |
| 661 | b = Float() |
| 662 | |
| 663 | a = A() |
| 664 | a.observe(self.notify1, "a") |
| 665 | a.a = 0 |
| 666 | self.assertEqual(len(self._notify1), 0) |
| 667 | a.a = 10 |
| 668 | change = change_dict("a", 0, 10, a, "change") |
| 669 | self.assertTrue(change in self._notify1) |
| 670 | self.assertRaises(TraitError, setattr, a, "a", "bad string") |
| 671 | |
| 672 | def test_subclass(self): |
| 673 | class A(HasTraits): |
nothing calls this directly
no test coverage detected