Skip to content
Snippets Groups Projects
Commit 1d912493 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Update pytest to utilize params

parent 09dd7af3
Branches
Tags
2 merge requests!68Develop,!67Resolve "Change Single Read to Single End for submitted endness"
Pipeline #9148 failed with stages
in 4 hours, 2 minutes, and 25 seconds
before_script:
- module load python/3.6.4-anaconda
- pip install --user attrs==19.1.0 pytest-pythonpath==0.7.1 pytest-cov==2.5.1
- pip install --user attrs==20.3.0 pytest==6.2.2 pytest-pythonpath==0.7.3 pytest-cov==2.11.1
- module load singularity/3.5.3
- module load nextflow/20.01.0
- ln -sfn /project/BICF/BICF_Core/shared/gudmap/test_data/* ./test_data/
......@@ -666,7 +666,7 @@ integration_se:
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID 16-1ZX4 --source staging --upload true -with-dag dag.png --dev false --ci true -with-report ./SE_report.html
- find . -type f -name "multiqc_data.json" -exec cp {} ./SE_multiqc_data.json \;
- pytest -m completion("SE_multiqc_data.json")
- pytest -m completionMultiqc --filename SE_multiqc_data.json
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -691,7 +691,7 @@ integration_pe:
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID Q-Y5JA --source staging --upload true -with-dag dag.png --dev false --ci true -with-report ./PE_report.html
- find . -type f -name "multiqc_data.json" -exec cp {} ./PE_multiqc_data.json \;
- pytest -m completion("PE_multiqc_data.json")
- pytest -m completionMultiqc --filename PE_multiqc_data.json
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -793,7 +793,7 @@ override_inputBag:
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID Q-Y5F6 --source staging --inputBagForce ./test_data/bag/Q-Y5F6_inputBag_xxxxxxxx.zip --upload false --dev false --ci true -with-report ./inputBagOverride_report.html
- find . -type f -name "multiqc_data.json" -exec cp {} ./inputBagOverride_PE_multiqc_data.json \;
- pytest -m completion("inputBagOverride_PE_multiqc_data.json")
- pytest -m completionMultiqc --filename inputBagOverride_PE_multiqc_data.json
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -816,7 +816,7 @@ override_fastq:
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID Q-Y5F6 --source staging --fastqsForce './test_data/fastq/small/Q-Y5F6_1M.R{1,2}.fastq.gz' --upload false --dev false --ci true -with-report ./fastqOverride_report.html
- find . -type f -name "multiqc_data.json" -exec cp {} ./fastqOverride_PE_multiqc_data.json \;
- pytest -m completion("fastqOverride_PE_multiqc_data.json")
- pytest -m completionMultiqc --filename fastqOverride_PE_multiqc_data.json
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -839,7 +839,7 @@ override_species:
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID Q-Y5ER --source staging --speciesForce 'Homo sapiens' --upload false --dev false --ci true -with-report ./speciesOverride_report.html
- find . -type f -name "multiqc_data.json" -exec cp {} ./speciesOverride_PE_multiqc_data.json \;
- pytest -m completion("speciesOverride_PE_multiqc_data.json")
- pytest -m completionMultiqc --filename speciesOverride_PE_multiqc_data.json
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -862,7 +862,7 @@ override_stranded:
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID Q-Y5ER --source staging --strandedForce unstranded --upload false --dev false --ci true -with-report ./strandedOverride_report.html
- find . -type f -name "multiqc_data.json" -exec cp {} ./strandedOverride_PE_multiqc_data.json \;
- pytest -m completion("strandedOverride_PE_multiqc_data.json")
- pytest -m completionMultiqc --filename strandedOverride_PE_multiqc_data.json
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -885,7 +885,7 @@ override_spike:
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID Q-Y5ER --source staging --spikeForce t --upload false --dev false --ci true -with-report ./spikeOverride_report.html
- find . -type f -name "multiqc_data.json" -exec cp {} ./spikeOverride_PE_multiqc_data.json \;
- pytest -m completion("spikedOverride_PE_multiqc_data.json")
- pytest -m completionMultiqc --filename spikedOverride_PE_multiqc_data.json
artifacts:
name: "$CI_JOB_NAME"
when: always
......
#!/usr/bin/env python3
import pytest
def pytest_addoption(parser):
parser.addoption("--filename", action="store")
@pytest.fixture(scope='session')
def filename(request):
filename_value = request.config.option.filename
if filename_value is None:
pytest.skip()
return filename_value
\ No newline at end of file
......@@ -9,8 +9,7 @@ import json
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../../'
@pytest.mark.completion
def test_multiqc(file_name):
@pytest.mark.completionMultiqc
def test_multiqcExist(filename):
assert os.path.exists(os.path.join(
test_output_path, file_name))
\ No newline at end of file
test_output_path, filename))
\ No newline at end of file
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