Skip to content

Commit

Permalink
add test imported hpb
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Apr 17, 2024
1 parent 8948063 commit 2ef2316
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion prody/tests/proteins/test_insty.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from prody.proteins.interactions import calcPiCationTrajectory, calcHydrophobicTrajectory
from prody.proteins.interactions import calcDisulfideBondsTrajectory, calcProteinInteractions

import sys

class TestInteractions(unittest.TestCase):

def setUp(self):
Expand Down Expand Up @@ -132,4 +134,20 @@ def testDisulfideBonds(self):
assert_equal(sorted([i[-1][-1] for i in data_test if i]), sorted([i[-1][-1] for i in self.DISU_INTERACTIONS if i]),
'failed to get correct disulfide bonds')


def testImportHpb(self):
imported_hpb = False

try:
import prody.proteins.hpb as hpb
imported_hpb = True
except ImportError:
try:
import hpb
imported_hpb = True
except ImportError:
raise ImportError('Please provide hpb.so file.')

if sys.version_info[1] < 11:
self.assertTrue(imported_hpb)
else:
self.assertFalse(imported_hpb)

0 comments on commit 2ef2316

Please sign in to comment.