docstr: Test the runtime bash_command is the function's return string, rendered if needed.
docstr_tok: ["Test","the","runtime","bash_command","is","the","function","'s","return","string",",","rendered","if","needed","."]
code: def test_bash_command(
      self, command, expected_command, expected_return_val
  ):
      """Test the runtime bash_command is the function's return string, rendered if needed."""
  
      with self.dag:
  
          @task.bash
          def bash():
              return command
  
          bash_task = bash()
  
      assert bash_task.operator.bash_command == NOTSET
  
      ti, return_val = self.execute_task(bash_task)
  
      assert bash_task.operator.bash_command == expected_command
      assert return_val == expected_return_val
  
      self.validate_bash_command_rtif(ti, expected_command)
  
imports: from __future__ import annotations
  import os
  import stat
  from contextlib import nullcontext
  from unittest import mock
  import pytest
  from airflow.decorators import task
  from airflow.exceptions import AirflowException, AirflowSkipException
  from airflow.models.renderedtifields import RenderedTaskInstanceFields
  from airflow.utils import timezone
  from airflow.utils.types import NOTSET
  from tests.test_utils.db import clear_db_dags, clear_db_runs, clear_rendered_ti_fields
label_desc: Use image node_id 6 for calling the TestBashDecorator obj's underlying member method code with example usage: obj.test_bash_command(command, expected_command, expected_return_val) and returns: command