def METHOD_NAME(
    mock_docker_app_context,
    tmp_path,
    sub_check_output_kw,
    capsys,
):
    """Path-based arguments and environment are converted to strings and passed in as-
    is."""
    output = mock_docker_app_context.check_output(
        ["hello", tmp_path / "location"],
        env={
            "MAGIC": "True",
            "PATH": f"/somewhere/safe:{tmp_path / 'briefcase' / 'tools'}:{tmp_path / 'bundle' / 'location'}",
        },
        cwd=tmp_path / "cwd",
    )
    assert output == "goodbye\n"
    mock_docker_app_context.tools.subprocess._subprocess.check_output.assert_called_once_with(
        [
            "docker",
            "run",
            "--rm",
            "--volume",
            f"{tmp_path / 'bundle'}:/app:z",
            "--volume",
            f"{tmp_path / 'briefcase'}:/briefcase:z",
            "--env",
            "MAGIC=True",
            "--env",
            "PATH=/somewhere/safe:/briefcase/tools:/app/location",
            "--workdir",
            f"{tmp_path / 'cwd'}",
            "briefcase/com.example.myapp:py3.X",
            "hello",
            os.fsdecode(tmp_path / "location"),
        ],
        **sub_check_output_kw,
    )
    assert capsys.readouterr().out == ""