From 64a214abb04f294c8a4a2d941db4f1e7cf2d61a5 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 17 Jul 2010 12:54:34 +0200 Subject: [PATCH] fix test in Py<=2.5 --- tests/run/contains_T455.pyx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/run/contains_T455.pyx b/tests/run/contains_T455.pyx index 1fa01821..c66906f3 100644 --- a/tests/run/contains_T455.pyx +++ b/tests/run/contains_T455.pyx @@ -13,15 +13,13 @@ def in_sequence(x, seq): >>> in_sequence(1, {1:None}) True - >>> in_sequence(1, None) + >>> in_sequence(1, None) # doctest: +ELLIPSIS Traceback (most recent call last): - ... - TypeError: argument of type 'NoneType' is not iterable + TypeError: ...iterable... - >>> in_sequence(1, 1) + >>> in_sequence(1, 1) # doctest: +ELLIPSIS Traceback (most recent call last): - ... - TypeError: argument of type 'int' is not iterable + TypeError: ...iterable... """ return x in seq @@ -40,15 +38,13 @@ def not_in_sequence(x, seq): >>> not_in_sequence(1, {1:None}) False - >>> not_in_sequence(1, None) + >>> not_in_sequence(1, None) # doctest: +ELLIPSIS Traceback (most recent call last): - ... - TypeError: argument of type 'NoneType' is not iterable + TypeError: ...iterable... - >>> not_in_sequence(1, 1) + >>> not_in_sequence(1, 1) # doctest: +ELLIPSIS Traceback (most recent call last): - ... - TypeError: argument of type 'int' is not iterable + TypeError: ...iterable... """ return x not in seq @@ -83,10 +79,10 @@ def not_in_dict(k, dict dct): def cascaded(a, b, c): """ - >>> cascaded(1, 2, 3) + >>> cascaded(1, 2, 3) # doctest: +ELLIPSIS Traceback (most recent call last): ... - TypeError: argument of type 'int' is not iterable + TypeError: ...iterable... >>> cascaded(-1, (1,2), (1,3)) True >>> cascaded(1, (1,2), (1,3)) -- 2.26.2