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

Add consistency tests #27

parent a0c9fde5
Branches
Tags
2 merge requests!37v0.0.1,!35Ci
Pipeline #7755 failed with stages
in 3 hours, 23 minutes, and 8 seconds
......@@ -158,8 +158,11 @@ integration_pe:
- Q-Y5JA_multiqc_data.json
expire_in: 7 days
consistency_se:
consistency:
stage: consistency
script:
- echo "TEST"
- grep -m 1 \"Assigned\":.[0-9] 16-1ZX4_multiqc_data.json | grep -oe '\([0-9.]*\)' > assignedSE.txt
- grep -m 1 \"Assigned\":.[0-9] Q-Y5JA_multiqc_data.json | grep -oe '\([0-9.]*\)' > assignedPE.txt
- pytest -m consistencySE
- pytest -m consistencyPE
#!/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__)) + \
'/../../'
test_sampleSE = '16-1ZX4'
test_assignededSE = '7742416'
test_samplePE = 'Q-Y5JA'
test_assignedPE = '2599149'
@pytest.mark.consistencySE
def test_consistencySE():
assert os.path.exists(os.path.join(test_output_path, test_sampleSE, '_multiqc_data.json'))
assert readAssigned("assignedSE.txt",test_assignedSE)
@pytest.mark.consistencyPE
def test_consistencyPE():
assert os.path.exists(os.path.join(test_output_path, test_samplePE, '_multiqc_data.json'))
assert readAssigned("assignedPE.txt",test_assignedPE)
def readAssgned(assignedFile,assigned):
data = False
file = open(assignedFile, "r")
line = file.readline()
if line.strip() == assigned:
data = True
return data
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