def METHOD_NAME(
    self, env: Optional[Dict[str, str]], mocker: MockerFixture, tmp_path: Path
) -> None:
    """Test _run_command."""
    ctx_env = {"foo": "bar", "bar": "foo"}
    mock_subprocess = mocker.patch(
        f"{MODULE}.subprocess.check_output", return_value="success"
    )
    assert (
        self.Kls(Mock(env=Mock(vars=ctx_env)), tmp_path)._run_command(
            "test", env=env
        )
        == mock_subprocess.return_value
    )
    mock_subprocess.assert_called_once_with(
        "test",
        cwd=tmp_path,
        env=env or ctx_env,
        shell=True,
        stderr=subprocess.PIPE,
        text=True,
    )