Skip to content
Snippets Groups Projects
Commit c0e59b31 authored by Jeremy Mathews's avatar Jeremy Mathews
Browse files

Restructure pytests

parent 62e0726d
Branches
Tags
4 merge requests!53Develop,!51Resolve "Add pytest to CI",!50Resolve "Add pytest to CI",!49Resolve "Add pytest to CI"
Pipeline #4461 passed with stages
in 19 minutes and 22 seconds
before_script:
- module load astrocyte
- module load python/3.6.1-2-anaconda
- pip install --user pytest-pythonpath==0.7.1 pytest-cov==2.5.1
- module load nextflow/0.31.1_Ignite
- mkdir test_data/hu.v2s1r500
- mkdir -p test_data/mu.v2s2r10k
......@@ -29,10 +30,7 @@ run_hu.cr3v2ref3.0.0:
stage: simple
script:
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/hu.v2s1r500/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/hu.v2s1r500/design.csv" --genome 'GRCh38-3.0.0' --kitVersion 'two' --version '3.0.2'
- pytest -m design
- pytest -m count302
- pytest -m versions
- pytest -m multiqc
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -50,10 +48,7 @@ run_mu.cr2v2ref1.2.0:
- tags
script:
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/mu.v2s2r10k/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/mu.v2s2r10k/design.csv" --genome 'mm10-1.2.0' --kitVersion 'auto' --version '2.1.1'
- pytest -m design
- pytest -m count211
- pytest -m versions
- pytest -m multiqc
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -71,10 +66,7 @@ run_hu.cr3v3ref3.0.0:
- tags
script:
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/hu.v3s2r10k/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/hu.v3s2r10k/design.csv" --genome 'GRCh38-3.0.0' --kitVersion 'auto' --version '3.0.2'
- pytest -m design
- pytest -m count302
- pytest -m versions
- pytest -m multiqc
artifacts:
name: "$CI_JOB_NAME"
when: always
......
......@@ -6,8 +6,12 @@ from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/misc/checkDesignFile/**/'
'/../output/misc/checkDesignFile/run/'
@pytest.mark.design
def test_design():
@pytest.mark.count211
def test_count211_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
@pytest.mark.count302
def test_count302_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
......@@ -5,18 +5,16 @@ import pandas as pd
from io import StringIO
import os
@pytest.mark.count211
def test_count211():
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/count211/'
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/'
@pytest.mark.count301
def test_count301():
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/count301/'
@pytest.mark.count211
def test_count211_count():
assert os.path.exists(os.path.join(test_output_path, 'count211', 'sample1_metrics_summary.tsv'))
assert os.path.exists(os.path.join(test_output_path, 'count211', 'sample1', 'outs'))
@pytest.mark.count302
def test_count302():
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/count302/'
def test_count302_count():
assert os.path.exists(os.path.join(test_output_path, 'count302', 'sample1_metrics_summary.tsv'))
assert os.path.exists(os.path.join(test_output_path, 'count302', 'sample1', 'outs'))
......@@ -6,8 +6,12 @@ from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/multiqc/**/'
'/../output/multiqc/run/'
@pytest.mark.multiqc
def test_multiqc():
@pytest.mark.count211
def test_count211_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
@pytest.mark.count302
def test_count302_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
......@@ -6,9 +6,14 @@ from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/misc/versions/**/'
'/../output/misc/versions/run/'
@pytest.mark.versions
def test_versions():
@pytest.mark.count211
def test_count211_versions():
assert os.path.exists(os.path.join(test_output_path, 'versions_mqc.yaml'))
assert os.path.exists(os.path.join(test_output_path, 'references_mqc.yaml'))
@pytest.mark.count302
def test_count302_versions():
assert os.path.exists(os.path.join(test_output_path, 'versions_mqc.yaml'))
assert os.path.exists(os.path.join(test_output_path, 'references_mqc.yaml'))
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment