File tree Expand file tree Collapse file tree 2 files changed +571
-14
lines changed Expand file tree Collapse file tree 2 files changed +571
-14
lines changed Original file line number Diff line number Diff line change 1
- from cwltool import command_line_tool
2
- from cwltool .context import RuntimeContext
3
- from cwltool .utils import windows_default_container_id
1
+ import pytest
2
+
3
+ from cwltool import command_line_tool , loghandler
4
+ from cwltool .context import LoadingContext , RuntimeContext
5
+ from cwltool .utils import onWindows , windows_default_container_id
4
6
5
7
6
- # Test to check warning when default docker Container is used on Windows
7
8
def test_default_docker_warning (mocker ):
8
- mocker . patch ( "cwltool.command_line_tool.onWindows" , return_value = True )
9
+ """Check warning when default docker Container is used on Windows."""
9
10
mocker .patch ("cwltool.command_line_tool._logger" )
11
+ mocker .patch ("cwltool.command_line_tool.onWindows" , return_value = True )
10
12
11
- class TestCommandLineTool (command_line_tool .CommandLineTool ):
12
- def __init__ (self , ** kwargs ):
13
- self .requirements = []
14
- self .hints = []
15
-
16
- def find_default_container (self , args , builder ):
17
- return windows_default_container_id
18
-
19
- tool = TestCommandLineTool ()
13
+ tool = command_line_tool .CommandLineTool (
14
+ {"inputs" : [], "outputs" : []}, LoadingContext ()
15
+ )
20
16
tool .make_job_runner (
21
17
RuntimeContext ({"find_default_container" : lambda x : "frolvlad/alpine-bash" })
22
18
)
You can’t perform that action at this time.
0 commit comments