Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/cwltool/tests/test_docker_paths_with_colons.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 | |
2 | |
3 from cwltool.docker import DockerCommandLineJob | |
4 | |
5 | |
6 def test_docker_append_volume_read_only(mocker: Any) -> None: | |
7 mocker.patch("os.mkdir") | |
8 runtime = ["runtime"] | |
9 characters = ":,\"'" | |
10 DockerCommandLineJob.append_volume( | |
11 runtime, "/source" + characters, "/target" + characters | |
12 ) | |
13 assert runtime == [ | |
14 "runtime", | |
15 "--mount=type=bind," | |
16 '"source=/source:,""\'",' | |
17 '"target=/target:,""\'",' | |
18 "readonly", | |
19 ] | |
20 | |
21 | |
22 def test_docker_append_volume_read_write(mocker: Any) -> None: | |
23 mocker.patch("os.mkdir") | |
24 runtime = ["runtime"] | |
25 characters = ":,\"'" | |
26 DockerCommandLineJob.append_volume( | |
27 runtime, "/source" + characters, "/target" + characters, True | |
28 ) | |
29 assert runtime == [ | |
30 "runtime", | |
31 "--mount=type=bind," '"source=/source:,""\'",' '"target=/target:,""\'"', | |
32 ] |