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

Function test_allow_none_default_value

tests/test_traitlets.py:1817–1827  ·  view source on GitHub ↗
(Trait)

Source from the content-addressed store, hash-verified

1815 ),
1816)
1817def test_allow_none_default_value(Trait):
1818 class C(HasTraits):
1819 t = Trait(default_value=None, allow_none=True)
1820
1821 # test default value
1822 c = C()
1823 assert c.t is None
1824
1825 # and in constructor
1826 c = C(t=None)
1827 assert c.t is None
1828
1829
1830@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

CClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…