Skip to content
Snippets Groups Projects
Commit d5ac4ae7 authored by Melvin Alappat's avatar Melvin Alappat
Browse files

additional check in pytest

parent 0329e263
Branches Issue_4
No related tags found
1 merge request!16Issue_4
Pipeline #13908 passed
......@@ -29,7 +29,17 @@ def test_inter_prob():
mytestfile = open(Output_file, "r") # Test whether gff file start with transcript ID
for mylinecounter in mytestfile:
assert mylinecounter.startswith("NW_005196756.1:c68260-66684")
mytestfile.close()
with open(Output_file, "r") as tt: # Check whether number of interactions is right
x = len(tt.readlines())
assert x == 3
prob = open(Output_file, "r") # check if the sum of the probabilities is 1
lines = prob.readlines()
probabilities = []
for x in lines:
probabilities.append(float(x.split('\t')[5]))
prob.close()
assert sum(probabilities) == 1 # sum should equal 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment