From d65d19ec0979b285482afb3da4445b8f2f45d4cb Mon Sep 17 00:00:00 2001 From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu> Date: Wed, 12 Aug 2020 15:20:39 -0500 Subject: [PATCH] Add unit test for outputBag --- .gitlab-ci.yml | 10 ++++++++-- workflow/tests/test_outputBag.py | 13 +++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 workflow/tests/test_outputBag.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dc2eab1..19f279a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,6 +130,13 @@ dataQC: echo "tin.py -i ./test_data/bam/small/Q-Y5F6_1M.se.sorted.deduped.${i}.bam -r /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12.v31/bed/genome.bed; cat Q-Y5F6_1M.se.sorted.deduped.${i}.tin.xls | tr -s \"\\w\" \"\\t\" | grep -P \"\\t${i}\\t\";"; done | singularity run 'docker://bicf/rseqc3.0:2.0.1_indev' parallel -j 20 -k >> Q-Y5F6_1M.se.sorted.deduped.tin.xls - pytest -m dataQC +outputBag: + stage: unit + script: + - mkdir test + - singularity run 'docker://bicf/gudmaprbkfilexfer:2.0.1_indev' bdbag test --archiver zip + - pytest -m outputBag + integration_se: stage: integration @@ -181,5 +188,4 @@ consistency: - assignedPE.txt - assignedExpectSE.txt - assignedExpectPE.txt - expire_in: 7 days - + expire_in: 7 days \ No newline at end of file diff --git a/workflow/tests/test_outputBag.py b/workflow/tests/test_outputBag.py new file mode 100644 index 0000000..4132d83 --- /dev/null +++ b/workflow/tests/test_outputBag.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import pytest +import pandas as pd +from io import StringIO +import os + +test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ + '/../../' + +@pytest.mark.outputBag +def test_outputBag(): + assert os.path.exists(os.path.join(test_output_path, 'test.zip')) -- GitLab