Skip to content

Commit

Permalink
Fixed #26923 -- Fixed template_tests with numpy < 1.9.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhertzog authored and timgraham committed Jul 21, 2016
1 parent 283b468 commit 8e5cbc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/template_tests/syntax_tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
VisibleDeprecationWarning = numpy.VisibleDeprecationWarning
except ImportError:
numpy = False
except AttributeError: # numpy < 1.9.0, e.g. 1.8.2 in Debian 8
VisibleDeprecationWarning = DeprecationWarning


@skipIf(numpy is False, "Numpy must be installed to run these tests.")
Expand All @@ -20,7 +22,7 @@ class NumpyTests(SimpleTestCase):
"ignore",
"Using a non-integer number instead of an "
"integer will result in an error in the future",
numpy.VisibleDeprecationWarning
VisibleDeprecationWarning
)

@setup({'numpy-array-index01': '{{ var.1 }}'})
Expand Down

0 comments on commit 8e5cbc8

Please sign in to comment.