[pypy-commit] pypy py3.3: Fix test to check for DeprecationWarning instead of PendingDeprecationWarning.
mjacob
noreply at buildbot.pypy.org
Fri Jul 17 21:09:26 CEST 2015
Author: Manuel Jacob <me at manueljacob.de>
Branch: py3.3
Changeset: r78590:2293d8db2159
Date: 2015-07-17 20:48 +0200
http://bitbucket.org/pypy/pypy/changeset/2293d8db2159/
Log: Fix test to check for DeprecationWarning instead of
PendingDeprecationWarning.
diff --git a/pypy/objspace/std/test/test_newformat.py b/pypy/objspace/std/test/test_newformat.py
--- a/pypy/objspace/std/test/test_newformat.py
+++ b/pypy/objspace/std/test/test_newformat.py
@@ -152,18 +152,18 @@
msg = "object.__format__ with a non-empty format string is deprecated",
with warnings.catch_warnings(record=True) as log:
# This is ok because warnings.catch_warnings resets the filters
- warnings.simplefilter("always", PendingDeprecationWarning)
+ warnings.simplefilter("always", DeprecationWarning)
assert self.s("{0:^10}").format(E("data")) == " E(data) "
assert log[0].message.args == msg
- assert type(log[0].message) is PendingDeprecationWarning
+ assert type(log[0].message) is DeprecationWarning
assert self.s("{0:^10s}").format(E("data")) == " E(data) "
assert log[1].message.args == msg
- assert type(log[1].message) is PendingDeprecationWarning
+ assert type(log[1].message) is DeprecationWarning
assert self.s("{0:>15s}").format(G("data")) == " string is data"
assert log[2].message.args == msg
- assert type(log[2].message) is PendingDeprecationWarning
+ assert type(log[2].message) is DeprecationWarning
assert len(log) == 3
def test_bogus_cases(self):
More information about the pypy-commit
mailing list