def _test_init_dependency_error(self):
    """Tests that a ``ModuleNotFoundError`` is raised when the task is instantiated if the required dependencies are not
    available."""
    with pytest.raises(ModuleNotFoundError, match="Required dependencies not available."):
        _ = self.instantiated_task
Tests that a ``ModuleNotFoundError`` is raised when the task is instantiated if the required dependencies are not
    available.
tests/helpers/task_tester.py