File: test_explode.py

package info (click to toggle)
cwlformat 2022.02.18-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,016 kB
  • sloc: python: 199; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright (c) 2020 Seven Bridges

import pathlib

import ruamel.yaml

from cwlformat.explode import explode, CWLProcess

yaml = ruamel.yaml.YAML()

current_path = pathlib.Path(__file__).parent


def test_explode():
    path = current_path / "cwl"
    src_fp = path / "formatted-atac-seq-pipeline.cwl"
    fp_out = src_fp.parent / "expected-exploded-atac-seq.cwl"

    as_dict = yaml.load(src_fp.read_text())
    for exploded in explode(CWLProcess(as_dict, fp_out)):
        assert exploded.file_path.exists()