Skip to content

Commit cbb284f

Browse files
committed
remove unnecessary subclass
1 parent a0cc284 commit cbb284f

File tree

2 files changed

+571
-14
lines changed

2 files changed

+571
-14
lines changed

tests/test_docker_warning.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
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
46

57

6-
# Test to check warning when default docker Container is used on Windows
78
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."""
910
mocker.patch("cwltool.command_line_tool._logger")
11+
mocker.patch("cwltool.command_line_tool.onWindows", return_value=True)
1012

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+
)
2016
tool.make_job_runner(
2117
RuntimeContext({"find_default_container": lambda x: "frolvlad/alpine-bash"})
2218
)

0 commit comments

Comments
 (0)