Skip to content

Commit

Permalink
Updated test imports
Browse files Browse the repository at this point in the history
  • Loading branch information
urbj committed Sep 10, 2024
1 parent d32e373 commit 45babde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Empty file added tests/__init__.py
Empty file.
6 changes: 3 additions & 3 deletions tests/test_CandyCrumbs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from analysis import CandyCrumbs
from CandyCrunch.analysis import CandyCrumbs

class TestCandyCrunch(unittest.TestCase):
def test_candy_crumbs(self):
Expand Down Expand Up @@ -57,7 +57,7 @@ def test_candy_crumbs(self):
total_score = 0
for test_dict in test_dicts:
result = CandyCrumbs(test_dict['glycan_string'], test_dict['masses'], 0.2, charge=test_dict['charge'],label_mass=test_dict['label_mass'])

total_annotations = len(test_dict['annotations'])
correct_annotations = 0

Expand All @@ -79,7 +79,7 @@ def test_candy_crumbs(self):
self.assertGreaterEqual(total_score, threshold,
f"Performance below acceptable threshold. Score: {total_score:.2f}, Threshold: {threshold}")

print(f"Test passed. Score: {total_score:.2f}")
print(f"Test passed. Score: {total_score:.2f}, Threshold: {threshold}")

if __name__ == '__main__':
unittest.main()

0 comments on commit 45babde

Please sign in to comment.