Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/cwltool/tests/test_docker_warning.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
1 from typing import Any, cast | |
2 | |
3 import pytest | |
4 from ruamel.yaml.comments import CommentedMap | |
5 from schema_salad.sourceline import cmap | |
6 | |
7 from cwltool import command_line_tool | |
8 from cwltool.context import LoadingContext, RuntimeContext | |
9 from cwltool.utils import onWindows, windows_default_container_id | |
10 | |
11 | |
12 @pytest.mark.skip(not onWindows(), reason="MS Windows only") # type: ignore | |
13 def test_default_docker_warning(mocker: Any) -> None: | |
14 """Check warning when default docker Container is used on Windows.""" | |
15 mocker.patch("cwltool.command_line_tool._logger") | |
16 | |
17 tool = command_line_tool.CommandLineTool( | |
18 cast(CommentedMap, cmap({"inputs": [], "outputs": []})), LoadingContext() | |
19 ) | |
20 tool.make_job_runner( | |
21 RuntimeContext({"find_default_container": lambda x: "frolvlad/alpine-bash"}) | |
22 ) | |
23 | |
24 command_line_tool._logger.warning.assert_called_with( # type: ignore | |
25 command_line_tool.DEFAULT_CONTAINER_MSG, | |
26 windows_default_container_id, | |
27 windows_default_container_id, | |
28 ) |