Refs #23890 -- Restored silencing of numpy DeprecationWarnings in template tests.
This commit is contained in:
parent
5c68870169
commit
3bb52c5019
|
@ -1,4 +1,5 @@
|
||||||
from unittest import skipIf
|
from unittest import skipIf
|
||||||
|
import warnings
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.test import SimpleTestCase
|
from django.test import SimpleTestCase
|
||||||
|
@ -13,6 +14,13 @@ except ImportError:
|
||||||
|
|
||||||
@skipIf(numpy is False, "Numpy must be installed to run these tests.")
|
@skipIf(numpy is False, "Numpy must be installed to run these tests.")
|
||||||
class NumpyTests(SimpleTestCase):
|
class NumpyTests(SimpleTestCase):
|
||||||
|
# Ignore numpy deprecation warnings (#23890)
|
||||||
|
warnings.filterwarnings(
|
||||||
|
"ignore",
|
||||||
|
"Using a non-integer number instead of an "
|
||||||
|
"integer will result in an error in the future",
|
||||||
|
DeprecationWarning
|
||||||
|
)
|
||||||
|
|
||||||
@setup({'numpy-array-index01': '{{ var.1 }}'})
|
@setup({'numpy-array-index01': '{{ var.1 }}'})
|
||||||
def test_numpy_array_index01(self):
|
def test_numpy_array_index01(self):
|
||||||
|
|
Loading…
Reference in New Issue