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
with pytest.raises(AirflowException, match="Option --raw and --local are mutually exclusive."):
            task_command.task_run(
                self.parser.parse_args(
                    [
                        'tasks',
                        'run',
                        'example_bash_operator',
                        'runme_0',
                        DEFAULT_DATE.isoformat(),
                        '--raw',
                        '--local',
                    ]
                )
            )
    def test_task_state(self):
        task_command.task_state(
            self.parser.parse_args(
                ['tasks', 'state', 'example_bash_operator', 'runme_0', DEFAULT_DATE.isoformat()]
            )
        )
    def test_task_states_for_dag_run(self):
        dag2 = DagBag().dags['example_python_operator']
        task2 = dag2.get_task(task_id='print_the_context')
        default_date2 = timezone.make_aware(datetime(2016, 1, 9))
        dag2.clear()
        ti2 = TaskInstance(task2, default_date2)
        ti2.set_state(State.SUCCESS)
        ti_start = ti2.start_date
        ti_end = ti2.end_date
        with redirect_stdout(io.StringIO()) as stdout: