MCPcopy Create free account
hub / github.com/celery/celery / test_Task__class_getitem__

Method test_Task__class_getitem__

t/unit/test_generics.py:23–26  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 assert get_args(Celery[Task]) == (Task,), "__class_getitem__ returns a GenericAlias"
22
23 def test_Task__class_getitem__(self):
24 task = Task[[int], str]()
25 assert isinstance(task, Task), "Task can be instantiated with type parameters"
26 assert get_args(Task[[int], str]) == ([int], str), "__class_getitem__ returns a GenericAlias"
27
28 @pytest.mark.usefixtures('depends_on_current_app')
29 def test_AsyncResult__class_getitem__(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected