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

restructre pytests

parent 6dd85b3e
2 merge requests!41Develop,!40Resolve "Add pytest to CI"
Pipeline #4460 passed with stages
in 2 minutes and 29 seconds
This commit is part of merge request !40. Comments created here will be created in the context of that merge request.
......@@ -29,12 +29,7 @@ simple_1FC:
- tags
script:
- nextflow run workflow/main.nf --bcl "test_data/simple1/*.tar.gz" --designFile "test_data/simple1/cellranger-tiny-bcl-simple-1_2_0.csv"
- pytest -m design
- pytest -m untarBCL
- pytest -m mkfastq
- pytest -m fastqc
- pytest -m versions
- pytest -m multiqc
- pytest -m simple1
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -50,12 +45,7 @@ simple_2FC:
stage: simple
script:
- nextflow run workflow/main.nf --bcl "test_data/simple2/*.tar.gz" --designFile "test_data/simple2/cellranger-tiny-bcl-simple-1_2_0.csv"
- pytest -m design
- pytest -m untarBCL
- pytest -m mkfastq
- pytest -m fastqc
- pytest -m versions
- pytest -m multiqc
- pytest -m simple2
artifacts:
name: "$CI_JOB_NAME"
when: always
......
......@@ -8,7 +8,10 @@ import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/misc/checkDesignFile/run/'
@pytest.mark.design
def test_design():
design_file = os.path.join(test_output_path, 'design.checked.csv')
assert os.path.exists(design_file)
@pytest.mark.simple1
def test_simple1_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
@pytest.mark.simple2
def test_simple2_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
......@@ -6,8 +6,13 @@ from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/misc/fastqc/run/cellranger-tiny-bcl-1_2_0/'
'/../output/misc/fastqc/run/'
@pytest.mark.fastqc
def test_fastqc():
assert os.path.exists(test_output_path)
@pytest.mark.simple1
def test_simple1_fastqc():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0'))
@pytest.mark.simple2
def test_simple2_fastqc():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-1'))
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-2'))
......@@ -4,11 +4,15 @@ import pytest
import pandas as pd
from io import StringIO
import os
import glob
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/mkfastq/cellranger-tiny-bcl-1_2_0/outs/'
'/../output/mkfastq/'
@pytest.mark.mkfastq
def test_mkfastq():
assert os.path.exists(test_output_path)
@pytest.mark.simple1
def test_simple1_mkfastq():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0', 'outs'))
@pytest.mark.simple2
def test_simple2_mkfastq():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-1', 'outs'))
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-2', 'outs'))
......@@ -8,6 +8,10 @@ import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/multiqc/run/'
@pytest.mark.multiqc
def test_multiqc():
@pytest.mark.simple1
def test_simple1_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
@pytest.mark.simple2
def test_simple2_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
......@@ -6,8 +6,13 @@ from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/untarBCL/cellranger-tiny-bcl-1_2_0/'
'/../output/untarBCL/'
@pytest.mark.untarBCL
def test_untarBCL():
assert os.path.exists(os.path.join(test_output_path, 'RTAComplete.txt'))
@pytest.mark.simple1
def test_simple1_untarBCL():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0', 'RTAComplete.txt'))
@pytest.mark.simple2
def test_simple2_untarBCL():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-1', 'RTAComplete.txt'))
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-2', 'RTAComplete.txt'))
......@@ -8,7 +8,12 @@ import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/misc/versions/run/'
@pytest.mark.versions
def test_versions():
@pytest.mark.simple1
def test_simple1_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.simple2
def test_simple2_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