Commit 486b97c7 authored by Jason Swails's avatar Jason Swails
Browse files

Add a test case for handling chamber prmtops.

parent 64b4ccc3
......@@ -316,7 +316,17 @@ class TestAmberPrmtopFile(unittest.TestCase):
simulation.reporters.append(DCDReporter(fname, 1)) # This is an explicit test for the bugs in issue #850
simulation.step(5)
os.remove(fname)
def testChamber(self):
""" Tests that Chamber prmtops fail with proper error message """
self.assertRaises(TypeError, lambda: AmberPrmtopFile('systems/ala3_solv.parm7'))
try:
parm = AmberPrmtopFile('systems/ala3_solv.parm7')
# Should not make it past here
self.assertTrue(False)
except TypeError as e:
# Make sure it says something about chamber
self.assertTrue('chamber' in str(e).lower())
if __name__ == '__main__':
unittest.main()
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment