summaryrefslogtreecommitdiff
path: root/numpy/testing/nosetester.py
diff options
context:
space:
mode:
authorseberg <sebastian@sipsolutions.net>2016-11-01 10:39:01 +0100
committerGitHub <noreply@github.com>2016-11-01 10:39:01 +0100
commit19fc7ad7f758a57d23c07830a3a8d054e7a11089 (patch)
tree1d24d307936f03e558a4a661d7dd1560a07437cf /numpy/testing/nosetester.py
parent6ae842001332f532e0c76815d49336ecc2b88dde (diff)
parentf685f1a83de2d8fc1e0f48167a204248b6656a63 (diff)
downloadnumpy-19fc7ad7f758a57d23c07830a3a8d054e7a11089.tar.gz
Merge pull request #8083 from njase/enh_7949
ENH: Deprecation warnings for `/` integer division when running python -3.
Diffstat (limited to 'numpy/testing/nosetester.py')
-rw-r--r--numpy/testing/nosetester.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py
index c30c0eecd..c07d65642 100644
--- a/numpy/testing/nosetester.py
+++ b/numpy/testing/nosetester.py
@@ -411,7 +411,20 @@ class NoseTester(object):
warnings.simplefilter("always")
from ..distutils import cpuinfo
sup.filter(category=UserWarning, module=cpuinfo)
-
+ # See #7949: Filter out deprecation warnings due to the -3 flag to
+ # python 2
+ if sys.version_info.major == 2 and sys.py3kwarning:
+ # This is very specific, so using the fragile module filter
+ # is fine
+ import threading
+ sup.filter(DeprecationWarning,
+ r"sys\.exc_clear\(\) not supported in 3\.x",
+ module=threading)
+ sup.filter(DeprecationWarning, message="in 3\.x, __setslice__")
+ sup.filter(DeprecationWarning, message="in 3\.x, __getslice__")
+ sup.filter(DeprecationWarning, message="buffer\(\) not supported in 3\.x")
+ sup.filter(DeprecationWarning, message="CObject type is not supported in 3\.x")
+ sup.filter(DeprecationWarning, message="comparing unequal types not supported in 3\.x")
# Filter out some deprecation warnings inside nose 1.3.7 when run
# on python 3.5b2. See
# https://github.com/nose-devs/nose/issues/929