"platforms/cuda2/tests/TestCudaCustomAngleForce.cpp" did not exist on "72d6b6a90dac6f459516c22f4551ca6991d845b3"
Commit 408cfe6c authored by Robert McGibbon's avatar Robert McGibbon
Browse files

Fix two tests for python3

parent ff0cdceb
......@@ -3,8 +3,12 @@ from validateConstraints import *
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
from simtk.openmm.app.gromacstopfile import _defaultGromacsIncludeDir
import simtk.openmm.app.element as elem
GROMACS_INCLUDE = _defaultGromacsIncludeDir()
@unittest.skipIf(not os.path.exists(GROMACS_INCLUDE), 'GROMACS is not installed')
class TestGromacsTopFile(unittest.TestCase):
"""Test the GromacsTopFile.createSystem() method."""
......
import sys
import unittest
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
import simtk.openmm.app.element as elem
import cStringIO
if sys.version_info >= (3, 0):
from StringIO import StringIO
else:
from cStringIO import StringIO
class TestPdbFile(unittest.TestCase):
"""Test the PDB file parser"""
......@@ -43,9 +48,9 @@ class TestPdbFile(unittest.TestCase):
def test_WriteFile(self):
"""Write a file, read it back, and make sure it matches the original."""
pdb1 = PDBFile('systems/triclinic.pdb')
output = cStringIO.StringIO()
output = StringIO()
PDBFile.writeFile(pdb1.topology, pdb1.positions, output)
input = cStringIO.StringIO(output.getvalue())
input = StringIO(output.getvalue())
pdb2 = PDBFile(input)
output.close();
input.close();
......
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