Skip to content

Commit

Permalink
fix bioexcel test has no timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Apr 17, 2024
1 parent 6eb9946 commit 8d64deb
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions prody/tests/database/test_bioexcel.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
N_FRAMES_1 = 10
N_FRAMES_2 = 6

TIMEOUT = 120

class TestFetchParseBioexcelPDB(unittest.TestCase):

@classmethod
Expand Down Expand Up @@ -417,7 +419,8 @@ def testFetchFrames1(self):

try:
a = fetchBioexcelTrajectory(self.query, folder=self.workdir,
frames=self.frames1)
frames=self.frames1,
timeout=TIMEOUT)
except OSError:
pass
else:
Expand Down Expand Up @@ -448,7 +451,8 @@ def testFetchSelectionFrames2(self):

try:
a = fetchBioexcelTrajectory(self.query, folder=self.workdir,
selection='_C', frames=self.frames2)
selection='_C', frames=self.frames2,
timeout=TIMEOUT)
except OSError:
pass
else:
Expand All @@ -466,7 +470,8 @@ def testFetchConvertFalse(self):

try:
a = fetchBioexcelTrajectory(self.query, folder=self.workdir,
convert=False, frames=self.frames1)
convert=False, frames=self.frames1,
timeout=TIMEOUT)
except OSError:
pass
else:
Expand All @@ -488,7 +493,8 @@ def testParseFrames1(self):

try:
ens = parseBioexcelTrajectory(self.query, folder=self.workdir,
frames=self.frames1)
frames=self.frames1,
timeout=TIMEOUT)
except OSError:
pass
else:
Expand All @@ -504,7 +510,8 @@ def testParseSelectionFrames2(self):
using selection='_C'."""
try:
ens = parseBioexcelTrajectory(self.query, folder=self.workdir,
selection='_C', frames=self.frames2)
selection='_C', frames=self.frames2,
timeout=TIMEOUT)
except OSError:
pass
else:
Expand All @@ -519,7 +526,8 @@ def testFetchAndParse(self):
"""Test the outcome of a simple fetch and parse scenario"""
try:
a = fetchBioexcelTrajectory(self.query, folder=self.workdir,
frames=self.frames1)
frames=self.frames1,
timeout=TIMEOUT)
except OSError:
pass
else:
Expand All @@ -536,7 +544,8 @@ def testFetchNoConvParse(self):
"""Test the outcome of a simple fetch, then internally convert and parse scenario."""
try:
a = fetchBioexcelTrajectory(self.query, folder=self.workdir,
convert=False, frames=self.frames1)
convert=False, frames=self.frames1,
timeout=TIMEOUT)
except OSError:
pass
else:
Expand All @@ -553,7 +562,8 @@ def testFetchConvParse(self):
"""Test the outcome of a simple fetch, externally convert and then parse scenario."""
try:
a = fetchBioexcelTrajectory(self.query, folder=self.workdir,
convert=False, frames=self.frames1)
convert=False, frames=self.frames1,
timeout=TIMEOUT)
except OSError:
pass
else:
Expand All @@ -570,7 +580,7 @@ def testFetchConvParse(self):
def testConvertWrongType(self):
with self.assertRaises(TypeError):
fetchBioexcelTrajectory(self.query, folder=self.workdir, convert='False',
timeout=self.timeout)
timeout=TIMEOUT)

@classmethod
def tearDownClass(cls):
Expand Down

0 comments on commit 8d64deb

Please sign in to comment.