File: test_multi_lined_doc.py

package info (click to toggle)
cwltest 2.5.20241122133319-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 800 kB
  • sloc: python: 2,700; makefile: 124; sh: 89
file content (18 lines) | stat: -rw-r--r-- 721 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from os import linesep as n

from .util import get_data, run_with_mock_cwl_runner


def test_run() -> None:
    args = ["--test", get_data("tests/test-data/multi-lined-doc.yml")]
    error_code, stdout, stderr = run_with_mock_cwl_runner(args)
    assert "The `label` field is deprecated. Use `id` field instead." in stderr
    assert f"Test [1/2] opt-error: Test with label{n}" in stderr
    assert f"Test [2/2] Test without label{n}" in stderr


def test_list() -> None:
    args = ["--test", get_data("tests/test-data/multi-lined-doc.yml"), "-l"]
    error_code, stdout, stderr = run_with_mock_cwl_runner(args)
    assert f"[1] opt-error: Test with label{n}" in stdout
    assert f"[2] Test without label{n}" in stdout