summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-08 14:30:53 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-06-08 14:30:53 (GMT)
commit9b775535f828bedc30f3f52a04afec049b6aa25a (patch)
tree12b9a0e80636c157457d827a7436e77d843e03b3 /Lib/test/pickletester.py
parent0157ebe999e951a4a3a5296586b08f4f96384bb3 (diff)
downloadcpython-9b775535f828bedc30f3f52a04afec049b6aa25a.zip
cpython-9b775535f828bedc30f3f52a04afec049b6aa25a.tar.gz
cpython-9b775535f828bedc30f3f52a04afec049b6aa25a.tar.bz2
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.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 9b21a5f..057cb5e 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -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