(self)
| 823 | self.assertFalse(a.has_trait("g")) |
| 824 | |
| 825 | def test_trait_has_value(self): |
| 826 | class A(HasTraits): |
| 827 | i = Int() |
| 828 | f = Float() |
| 829 | |
| 830 | a = A() |
| 831 | self.assertFalse(a.trait_has_value("f")) |
| 832 | self.assertFalse(a.trait_has_value("g")) |
| 833 | a.i = 1 |
| 834 | a.f |
| 835 | self.assertTrue(a.trait_has_value("i")) |
| 836 | self.assertTrue(a.trait_has_value("f")) |
| 837 | |
| 838 | def test_trait_metadata_deprecated(self): |
| 839 | with expected_warnings([r"metadata should be set using the \.tag\(\) method"]): |
nothing calls this directly
no test coverage detected