From ade9acec644773a73290e7371c98e826ca185351 Mon Sep 17 00:00:00 2001 From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu> Date: Mon, 10 Aug 2020 18:17:11 -0500 Subject: [PATCH] Change consistence test from exact match to within 1/100,000 change from expected --- .gitlab-ci.yml | 2 +- workflow/tests/test_consistency.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a525151..dc2eab1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,7 +168,7 @@ consistency: - grep -m 1 \"Assigned\":.[0-9] SE_multiqc_data.json | grep -oe '\([0-9.]*\)' > assignedSE.txt - grep -m 1 \"Assigned\":.[0-9] PE_multiqc_data.json | grep -oe '\([0-9.]*\)' > assignedPE.txt - echo 7742416 > assignedExpectSE.txt - - echo 2599149 > assignedExpectPE.txt + - echo 2599140 > assignedExpectPE.txt - pytest -m consistencySE - pytest -m consistencyPE artifacts: diff --git a/workflow/tests/test_consistency.py b/workflow/tests/test_consistency.py index 0aecc02..5b8b803 100644 --- a/workflow/tests/test_consistency.py +++ b/workflow/tests/test_consistency.py @@ -24,7 +24,7 @@ def readAssigned(fileAssigned,fileExpectAssigned): expect = open(fileExpectAssigned, "r") lineAssigned = assigned.readline() lineExpect = expect.readline() - if lineAssigned.strip() == lineExpect.strip(): + if lineAssigned.strip() < (lineExpect.strip()+(lineExpect.strip()*0.00001)) and lineAssigned.strip() > (lineExpect.strip()-(lineExpect.strip()*0.00001)): data = True return data -- GitLab