diff options
author | Michael W. Hudson <mwh@python.net> | 2002-05-20 14:24:53 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-05-20 14:24:53 (GMT) |
commit | 9c373061ad92f587adabd65ac8c0a25e4b1f39d1 (patch) | |
tree | 55f47363d249d5a00b651b88cadff030abdb9151 /Lib | |
parent | 7c6a4ad78fc2770abdf3c5dc56a459d9a8636086 (diff) | |
download | cpython-9c373061ad92f587adabd65ac8c0a25e4b1f39d1.zip cpython-9c373061ad92f587adabd65ac8c0a25e4b1f39d1.tar.gz cpython-9c373061ad92f587adabd65ac8c0a25e4b1f39d1.tar.bz2 |
tolerate --disable-unicode...
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_unary.py | 5 |
1 files 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") |