Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
311a2cff
Commit
311a2cff
authored
Nov 10, 2016
by
Jason Swails
Browse files
Add a test to make sure that the bond types are really singletons.
parent
7c7b945e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
wrappers/python/tests/TestTopology.py
wrappers/python/tests/TestTopology.py
+9
-0
No files found.
wrappers/python/tests/TestTopology.py
View file @
311a2cff
import
pickle
import
sys
import
unittest
from
simtk.openmm.app
import
*
...
...
@@ -26,6 +27,14 @@ class TestTopology(unittest.TestCase):
"""Test getters for number of atoms, residues, chains."""
self
.
check_pdbfile
(
'systems/1T2Y.pdb'
,
271
,
25
,
1
)
def
test_bondtype_singleton
(
self
):
""" Tests that the bond types are really singletons """
self
.
assertIs
(
Single
,
pickle
.
loads
(
pickle
.
dumps
(
Single
)))
self
.
assertIs
(
Double
,
pickle
.
loads
(
pickle
.
dumps
(
Double
)))
self
.
assertIs
(
Triple
,
pickle
.
loads
(
pickle
.
dumps
(
Triple
)))
self
.
assertIs
(
Aromatic
,
pickle
.
loads
(
pickle
.
dumps
(
Aromatic
)))
self
.
assertIs
(
Amide
,
pickle
.
loads
(
pickle
.
dumps
(
Amide
)))
def
test_residue_bonds
(
self
):
"""Test retrieving bonds for a residue produces expected results."""
# Create a test topology
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment