Skip to content

Commit

Permalink
TST Add failing test for very short peptides
Browse files Browse the repository at this point in the history
  • Loading branch information
luispedro committed May 19, 2021
1 parent f2d21db commit 4267c99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions macrel/tests/data/very_short.faa
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>short
AA
8 changes: 8 additions & 0 deletions macrel/tests/test_predict.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import numpy as np
from macrel import AMP_features, AMP_predict
from macrel.main import data_file
from os import path

def test_predict():
fs = AMP_features.features('tests/peptides/expep.faa.gz')
Expand All @@ -12,3 +13,10 @@ def test_predict():
fs, keep_negatives=True)
assert len(fsp) < len(fsn)
assert not np.all(fsn.is_AMP)

def test_predict_very_short():
fs = AMP_features.features(
path.join(path.dirname(__file__),
'data',
'very_short.faa'))
assert len(fs) == 1

0 comments on commit 4267c99

Please sign in to comment.