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

Function test_all_attribute

tests/test_traitlets.py:3151–3162  ·  view source on GitHub ↗

Verify all trait types are added to `traitlets.__all__`

()

Source from the content-addressed store, hash-verified

3149
3150
3151def test_all_attribute():
3152 """Verify all trait types are added to `traitlets.__all__`"""
3153 names = dir(traitlets)
3154 for name in names:
3155 value = getattr(traitlets, name)
3156 if not name.startswith("_") and isinstance(value, type) and issubclass(value, TraitType):
3157 if name not in traitlets.__all__:
3158 raise ValueError(f"{name} not in __all__")
3159
3160 for name in traitlets.__all__:
3161 if name not in names:
3162 raise ValueError(f"{name} should be removed from __all__")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…