Author: Ronan Lamy <ronan.l...@gmail.com> Branch: py3.5 Changeset: r90302:c13e668a628c Date: 2017-02-22 15:11 +0000 http://bitbucket.org/pypy/pypy/changeset/c13e668a628c/
Log: Use raises() instead of a hand-rolled equivalent diff --git a/pypy/objspace/std/test/test_obj.py b/pypy/objspace/std/test/test_obj.py --- a/pypy/objspace/std/test/test_obj.py +++ b/pypy/objspace/std/test/test_obj.py @@ -100,11 +100,8 @@ def test_format(self): class B: pass - try: - format(B(), 's') - assert False, "must not pass the previous call" - except TypeError as e: - assert 'B.__format__' in str(e) + excinfo = raises(TypeError, format, B(), 's') + assert 'B.__format__' in str(excinfo.value) def test_subclasshook(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit