File: test_examples.py

package info (click to toggle)
cwl-utils 0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,156 kB
  • sloc: python: 88,920; makefile: 141; javascript: 91
file content (16 lines) | stat: -rw-r--r-- 466 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# SPDX-License-Identifier: Apache-2.0
"""Tests of example Python scripts."""
import os
import runpy
from pathlib import Path


def test_load_example() -> None:
    """Test the load_cwl_by_path.py script."""
    cwd = Path.cwd()
    parent = Path(__file__).resolve().parent
    os.chdir(parent.parent)
    result_raw = runpy.run_path(str(parent / "load_cwl_by_path.py"))
    os.chdir(cwd)
    result = result_raw["saved_obj"]
    assert result["class"] == "Workflow"