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

Method test_init

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

Source from the content-addressed store, hash-verified

903 self.assertEqual(traits, dict(i=A.i, f=A.f, j=A.j))
904
905 def test_init(self):
906 class A(HasTraits):
907 i = Int()
908 x = Float()
909
910 a = A(i=1, x=10.0)
911 self.assertEqual(a.i, 1)
912 self.assertEqual(a.x, 10.0)
913
914 def test_positional_args(self):
915 class A(HasTraits):

Callers

nothing calls this directly

Calls 1

AClass · 0.70

Tested by

no test coverage detected