def test_registers_task_instance(self, worker: Worker):
        def func(x):
            return x

        worker.register("test", func)
        task = worker.get_registered_task("test")
        assert isinstance(task, Task)
    def test_can_get_registered_task(self, worker: Worker):
        # This can arguably be under this set of tests
        # or the `get_registered_task` tests,
        # but it makes sure that any registered task
        # can be retrieved by name.
        def func(x):
            return x

        worker.register("test", func)
        task = worker.get_registered_task("test")

        assert task.func == func
        assert task.name == "test"
        assert task.bind == False