From 76d982ef343dcadd35355aed9c568984c850fb7b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 13 Jan 2014 19:19:16 +0200 Subject: type->print(): Distinguish str() and repr() variety by passing extra param. --- tests/basics/tests/exception1.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/basics/tests/exception1.py b/tests/basics/tests/exception1.py index 95d933de7..93d2cbfb9 100644 --- a/tests/basics/tests/exception1.py +++ b/tests/basics/tests/exception1.py @@ -1,3 +1,9 @@ -# TODO: requires repr() -#a = IndexError(1, "test", [100, 200]) -#print(repr(a)) +print(repr(IndexError())) +print(str(IndexError())) + +print(repr(IndexError("foo"))) +print(str(IndexError("foo"))) + +a = IndexError(1, "test", [100, 200]) +print(str(a)) +print(repr(a)) -- cgit v1.2.3