MCPcopy Create free account
hub / github.com/ipython/traitlets / test_bad_default

Method test_bad_default

tests/test_traitlets.py:1158–1167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1156 self.assertTrue(c.inst is None)
1157
1158 def test_bad_default(self):
1159 class Foo:
1160 pass
1161
1162 class A(HasTraits):
1163 inst = Instance(Foo)
1164
1165 a = A()
1166 with self.assertRaises(TraitError):
1167 a.inst
1168
1169 def test_instance(self):
1170 class Foo:

Callers

nothing calls this directly

Calls 1

AClass · 0.70

Tested by

no test coverage detected