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
d05b7075
Commit
d05b7075
authored
Jun 19, 2015
by
Jason Swails
Browse files
Don't run tests that are known to fail due to numpy bug for buggy versions of
numpy.
parent
742c13c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
wrappers/python/tests/TestUnits.py
wrappers/python/tests/TestUnits.py
+8
-3
No files found.
wrappers/python/tests/TestUnits.py
View file @
d05b7075
...
...
@@ -690,6 +690,11 @@ class TestNumpyUnits(QuantityTestCase):
def
testMultiplication
(
self
):
""" Tests that units override numpy.ndarray multiplication """
self
.
assertIsInstance
(
np
.
arange
(
10
)
*
u
.
angstroms
,
u
.
Quantity
)
x
=
np
.
array
([
1
])
*
u
.
liters
self
.
assertIsInstance
(
x
,
u
.
Quantity
)
self
.
assertIsInstance
(
np
.
arange
(
10
)
*
x
,
u
.
Quantity
)
# This only works with versions of numpy > 1.7 due to a bug in older
# versions. Since Travis-CI installs Python 1.6.1 from aptitude, and we
# don't want it to report test failures *every time*, just disable this
# particular test for the numpy versions known to be bad.
if
np
.
version
.
version
>
'1.7'
:
x
=
np
.
array
([
1
])
*
u
.
liters
self
.
assertIsInstance
(
x
,
u
.
Quantity
)
self
.
assertIsInstance
(
np
.
arange
(
10
)
*
x
,
u
.
Quantity
)
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