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

adjusted test file

parent abb1e512
No related branches found
No related tags found
1 merge request!16Issue_4
Pipeline #13905 failed
"""Unit tests for module ``PrimingProb_CI``.""" """Unit tests for module ``PrimingProb_CI``."""
import os import os
from src.primingprob.priming_prob import Probability as Pbt from src.primingprob.priming_prob import inter_para, inter_prob
Energy_file = "./tests/resources/Energies_test.txt" Energy_file = "./tests/resources/Energies_test.txt"
Fasta_file = "./tests/resources/transcript.fasta" Fasta_file = "./tests/resources/transcript.fasta"
...@@ -9,7 +9,7 @@ Output_file = "./tests/resources/Potential_Priming_Sites.txt" ...@@ -9,7 +9,7 @@ Output_file = "./tests/resources/Potential_Priming_Sites.txt"
def test_inter_para(): def test_inter_para():
"""Tests InterPara function.""" """Tests InterPara function."""
testdata = Pbt.inter_para(Energy_file) testdata = inter_para(Energy_file)
assert len(testdata) == 3 # Number of interactions assert len(testdata) == 3 # Number of interactions
assert type(testdata) is list assert type(testdata) is list
for i in range(0, len(testdata)): for i in range(0, len(testdata)):
...@@ -23,7 +23,7 @@ testdata2 = test_inter_para() ...@@ -23,7 +23,7 @@ testdata2 = test_inter_para()
def test_inter_prob(): def test_inter_prob():
"""Tests InterProb function.""" """Tests InterProb function."""
Pbt.inter_prob(testdata2, Fasta_file, Output_file) inter_prob(testdata2, Fasta_file, Output_file)
assert os.path.exists(Output_file) is True # Check whether file exists assert os.path.exists(Output_file) is True # Check whether file exists
mytestfile = open(Output_file, "r") # Test whether gff file start with transcript ID mytestfile = open(Output_file, "r") # Test whether gff file start with transcript ID
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment