Exemple #1
0
 def test_incorrect_add(self):
     """Test that adding a non-BaseTrait will raise an exception."""
     with self.assertRaisesRegex(Exception, 'only be added'):
         traits.BaseTrait() + 3
Exemple #2
0
 class Foo:
     bar = traits.BaseTrait()
Exemple #3
0
 class Foo:
     a = traits.BaseTrait()