(self)
| 460 | self.assertEqual(len(self._notify1), 0) |
| 461 | |
| 462 | def test_notify_one(self): |
| 463 | class A(HasTraits): |
| 464 | a = Int() |
| 465 | b = Float() |
| 466 | |
| 467 | a = A() |
| 468 | a.on_trait_change(self.notify1, "a") |
| 469 | a.a = 0 |
| 470 | self.assertEqual(len(self._notify1), 0) |
| 471 | a.a = 10 |
| 472 | self.assertTrue(("a", 0, 10) in self._notify1) |
| 473 | self.assertRaises(TraitError, setattr, a, "a", "bad string") |
| 474 | |
| 475 | def test_subclass(self): |
| 476 | class A(HasTraits): |
nothing calls this directly
no test coverage detected