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
d47c51b9
"wrappers/vscode:/vscode.git/clone" did not exist on "2049b1fe4c6a734fccab60c356d4b485f7647304"
Commit
d47c51b9
authored
Mar 17, 2020
by
Zheng Gong
Browse files
use assertEqual on sorted list instead of assertCountEqual
parent
91920ef4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
wrappers/python/tests/TestCharmmFiles.py
wrappers/python/tests/TestCharmmFiles.py
+14
-14
No files found.
wrappers/python/tests/TestCharmmFiles.py
View file @
d47c51b9
...
@@ -374,26 +374,26 @@ class TestCharmmFiles(unittest.TestCase):
...
@@ -374,26 +374,26 @@ class TestCharmmFiles(unittest.TestCase):
system
=
psf
.
createSystem
(
params
,
constraints
=
None
,
rigidWater
=
False
)
system
=
psf
.
createSystem
(
params
,
constraints
=
None
,
rigidWater
=
False
)
self
.
assertEqual
(
system
.
getNumConstraints
(),
0
)
self
.
assertEqual
(
system
.
getNumConstraints
(),
0
)
system
=
psf
.
createSystem
(
params
,
constraints
=
None
,
rigidWater
=
True
)
system
=
psf
.
createSystem
(
params
,
constraints
=
None
,
rigidWater
=
True
)
self
.
assert
Count
Equal
(
[
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
]
,
self
.
assertEqual
(
sorted
(
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
)
,
hBonds_water
+
hAngles_water
)
sorted
(
hBonds_water
+
hAngles_water
)
)
system
=
psf
.
createSystem
(
params
,
constraints
=
HBonds
,
rigidWater
=
False
)
system
=
psf
.
createSystem
(
params
,
constraints
=
HBonds
,
rigidWater
=
False
)
self
.
assert
Count
Equal
(
[
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
]
,
self
.
assertEqual
(
sorted
(
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
)
,
hBonds_water
+
hBonds_methanol
)
sorted
(
hBonds_water
+
hBonds_methanol
)
)
system
=
psf
.
createSystem
(
params
,
constraints
=
HBonds
,
rigidWater
=
True
)
system
=
psf
.
createSystem
(
params
,
constraints
=
HBonds
,
rigidWater
=
True
)
self
.
assert
Count
Equal
(
[
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
]
,
self
.
assertEqual
(
sorted
(
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
)
,
hBonds_water
+
hAngles_water
+
hBonds_methanol
)
sorted
(
hBonds_water
+
hAngles_water
+
hBonds_methanol
)
)
system
=
psf
.
createSystem
(
params
,
constraints
=
AllBonds
,
rigidWater
=
False
)
system
=
psf
.
createSystem
(
params
,
constraints
=
AllBonds
,
rigidWater
=
False
)
self
.
assert
Count
Equal
(
[
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
]
,
self
.
assertEqual
(
sorted
(
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
)
,
hBonds_water
+
allBonds_methanol
)
sorted
(
hBonds_water
+
allBonds_methanol
)
)
system
=
psf
.
createSystem
(
params
,
constraints
=
AllBonds
,
rigidWater
=
True
)
system
=
psf
.
createSystem
(
params
,
constraints
=
AllBonds
,
rigidWater
=
True
)
self
.
assert
Count
Equal
(
[
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
]
,
self
.
assertEqual
(
sorted
(
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
)
,
hBonds_water
+
hAngles_water
+
allBonds_methanol
)
sorted
(
hBonds_water
+
hAngles_water
+
allBonds_methanol
)
)
system
=
psf
.
createSystem
(
params
,
constraints
=
HAngles
,
rigidWater
=
False
)
system
=
psf
.
createSystem
(
params
,
constraints
=
HAngles
,
rigidWater
=
False
)
self
.
assert
Count
Equal
(
[
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
]
,
self
.
assertEqual
(
sorted
(
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
)
,
hBonds_water
+
hAngles_water
+
allBonds_methanol
+
hAngles_methanol
)
sorted
(
hBonds_water
+
hAngles_water
+
allBonds_methanol
+
hAngles_methanol
)
)
system
=
psf
.
createSystem
(
params
,
constraints
=
HAngles
,
rigidWater
=
True
)
system
=
psf
.
createSystem
(
params
,
constraints
=
HAngles
,
rigidWater
=
True
)
self
.
assert
Count
Equal
(
[
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
]
,
self
.
assertEqual
(
sorted
(
system
.
getConstraintParameters
(
i
)[:
2
]
for
i
in
range
(
system
.
getNumConstraints
())
)
,
hBonds_water
+
hAngles_water
+
allBonds_methanol
+
hAngles_methanol
)
sorted
(
hBonds_water
+
hAngles_water
+
allBonds_methanol
+
hAngles_methanol
)
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
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