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
9fee45f9
Commit
9fee45f9
authored
Feb 27, 2015
by
peastman
Browse files
Added test for binary PDB streams
parent
8bcc9b3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
wrappers/python/tests/TestPdbFile.py
wrappers/python/tests/TestPdbFile.py
+6
-0
No files found.
wrappers/python/tests/TestPdbFile.py
View file @
9fee45f9
...
...
@@ -60,6 +60,12 @@ class TestPdbFile(unittest.TestCase):
self
.
assertEqual
(
atom1
.
name
,
atom2
.
name
)
self
.
assertEqual
(
atom1
.
residue
.
name
,
atom2
.
residue
.
name
)
def
test_BinaryStream
(
self
):
"""Test reading a stream that was opened in binary mode."""
pdb
=
PDBFile
(
open
(
'systems/triclinic.pdb'
,
'rb'
))
self
.
assertEqual
(
len
(
pdb
.
positions
),
8
)
def
assertVecAlmostEqual
(
self
,
p1
,
p2
,
tol
=
1e-7
):
unit
=
p1
.
unit
p1
=
p1
.
value_in_unit
(
unit
)
...
...
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