From 9c373061ad92f587adabd65ac8c0a25e4b1f39d1 Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Mon, 20 May 2002 14:24:53 +0000 Subject: tolerate --disable-unicode... --- Lib/test/test_unary.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_unary.py b/Lib/test/test_unary.py index 0c5dd94..7161f74 100644 --- a/Lib/test/test_unary.py +++ b/Lib/test/test_unary.py @@ -1,7 +1,7 @@ """Test compiler changes for unary ops (+, -, ~) introduced in Python 2.2""" import unittest -from test_support import run_unittest +from test_support import run_unittest, have_unicode class UnaryOpTestCase(unittest.TestCase): @@ -44,7 +44,8 @@ class UnaryOpTestCase(unittest.TestCase): def test_bad_types(self): for op in '+', '-', '~': self.assertRaises(TypeError, eval, op + "'a'") - self.assertRaises(TypeError, eval, op + "u'a'") + if have_unicode: + self.assertRaises(TypeError, eval, op + "u'a'") self.assertRaises(TypeError, eval, "~2j") self.assertRaises(TypeError, eval, "~2.0") -- cgit v0.12