summaryrefslogtreecommitdiff
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-04-26 06:45:24 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2011-04-26 06:45:24 +0300
commitbf1253b25ac6fc27beb9819dade9c4465ea493fc (patch)
tree8384277a6aa3d724947bde18989d2bc4ed17e37b /Lib/test/test_unicode.py
parentdff18b0858a3433cc0aa457a43e63aad86900586 (diff)
parentf2b3f780a160347b0759b8d0f8ea9c41a456f724 (diff)
downloadcpython-git-bf1253b25ac6fc27beb9819dade9c4465ea493fc.tar.gz
#6780: merge with 3.2.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index ace3736abe..f35458accc 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -819,6 +819,14 @@ class UnicodeTest(string_tests.CommonTest,
self.assertEqual('%f' % INF, 'inf')
self.assertEqual('%F' % INF, 'INF')
+ def test_startswith_endswith_errors(self):
+ for meth in ('foo'.startswith, 'foo'.endswith):
+ with self.assertRaises(TypeError) as cm:
+ meth(['f'])
+ exc = str(cm.exception)
+ self.assertIn('str', exc)
+ self.assertIn('tuple', exc)
+
@support.run_with_locale('LC_ALL', 'de_DE', 'fr_FR')
def test_format_float(self):
# should not format with a comma, but always with C locale