Task command has a few missing commands not tested: https://codecov.io/gh/apache/airflow/src/master/airflow/cli/commands/task_command.py (77%)

tests/cli/commands/test_task_command.py
"""If [core] donot_modify_handlers is set to True, the root logger is untouched"""
        from airflow import settings
        logger = logging.getLogger("foo.bar")
        def task_inner(*args, **kwargs):
            logger.warning("not redirected")
        run_task_mock.side_effect = task_inner
        config = {
            ('core', 'dags_folder'): self.dag_path,
            ('logging', 'logging_level'): "INFO",
        }
        old_value = settings.DONOT_MODIFY_HANDLERS
        settings.DONOT_MODIFY_HANDLERS = True
        with conf_vars(config):
            with self.assertLogs(level=logging.WARNING) as captured:
                task_command.task_run(self.parser.parse_args(self.task_args))
                assert captured.output == ["WARNING:foo.bar:not redirected"]
        settings.DONOT_MODIFY_HANDLERS = old_value
class TestCliTaskBackfill(unittest.TestCase):