File: test_prepare.py

package info (click to toggle)
cwltest 2.5.20241122133319-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 800 kB
  • sloc: python: 2,700; makefile: 124; sh: 89
file content (28 lines) | stat: -rw-r--r-- 818 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""Test prepare_test_command()"""

import os

from cwltest import utils


def test_unix_relative_path() -> None:
    """Confirm unix style to windows style path corrections."""
    command = utils.prepare_test_command(
        tool="cwl-runner",
        args=[],
        testargs=None,
        test={
            "doc": "General test of command line generation",
            "output": {"args": ["echo"]},
            "tool": "v1.0/bwa-mem-tool.cwl",
            "job": "v1.0/bwa-mem-job.json",
            "tags": ["required"],
        },
        cwd=os.getcwd(),
    )
    if os.name == "nt":
        assert command[3] == "v1.0\\bwa-mem-tool.cwl"
        assert command[4] == "v1.0\\bwa-mem-job.json"
    else:
        assert command[3] == "v1.0/bwa-mem-tool.cwl"
        assert command[4] == "v1.0/bwa-mem-job.json"