From 3ae84b6389f108fddbed5814cd210c3a0110c633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 9 Nov 2002 20:19:12 +0000 Subject: Allow both string and Unicode objects in levels. --- Lib/test/test___future__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test___future__.py b/Lib/test/test___future__.py index 7507aed..7d2b2ae 100644 --- a/Lib/test/test___future__.py +++ b/Lib/test/test___future__.py @@ -33,7 +33,7 @@ for feature in features: verify(type(major) is IntType, "optional major isn't int") verify(type(minor) is IntType, "optional minor isn't int") verify(type(micro) is IntType, "optional micro isn't int") - verify(type(level) is StringType, "optional level isn't string") + verify(isinstance(level, basestring), "optional level isn't string") verify(level in GOOD_SERIALS, "optional level string has unknown value") verify(type(serial) is IntType, "optional serial isn't int") @@ -46,7 +46,7 @@ for feature in features: verify(type(major) is IntType, "mandatory major isn't int") verify(type(minor) is IntType, "mandatory minor isn't int") verify(type(micro) is IntType, "mandatory micro isn't int") - verify(type(level) is StringType, "mandatory level isn't string") + verify(isinstance(level, basestring), "mandatory level isn't string") verify(level in GOOD_SERIALS, "mandatory serial string has unknown value") verify(type(serial) is IntType, "mandatory serial isn't int") -- cgit v0.12