MCPcopy
hub / github.com/django/django / test_empty

Method test_empty

tests/utils_tests/test_choices.py:144–150  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

142 ]
143
144 def test_empty(self):
145 def generator():
146 yield from ()
147
148 for choices in ({}, [], (), set(), frozenset(), generator()):
149 with self.subTest(choices=choices):
150 self.assertEqual(normalize_choices(choices), [])
151
152 def test_choices(self):
153 class Medal(TextChoices):

Callers

nothing calls this directly

Calls 1

normalize_choicesFunction · 0.90

Tested by

no test coverage detected