Rename checks for test_support.have_unicode (we always

have unicode support now) and either drop the tests or
merge them into the existing tests.
This commit is contained in:
Walter Dörwald 2007-06-08 14:30:53 +00:00
parent 0157ebe999
commit 9b775535f8
7 changed files with 62 additions and 112 deletions

View file

@ -7,8 +7,7 @@ except ImportError:
import pickletools
import copy_reg
from test.test_support import TestFailed, have_unicode, TESTFN, \
run_with_locale
from test.test_support import TestFailed, TESTFN, run_with_locale
# Tests that try a number of pickle protocols should have a
# for proto in protocols:
@ -482,15 +481,13 @@ class AbstractPickleTests(unittest.TestCase):
buf = b"S" + bytes(s) + b"\012p0\012."
self.assertRaises(ValueError, self.loads, buf)
if have_unicode:
def test_unicode(self):
endcases = [str(''), str('<\\u>'), str('<\\\u1234>'),
str('<\n>'), str('<\\>')]
for proto in protocols:
for u in endcases:
p = self.dumps(u, proto)
u2 = self.loads(p)
self.assertEqual(u2, u)
def test_unicode(self):
endcases = ['', '<\\u>', '<\\\u1234>', '<\n>', '<\\>']
for proto in protocols:
for u in endcases:
p = self.dumps(u, proto)
u2 = self.loads(p)
self.assertEqual(u2, u)
def test_ints(self):
import sys