mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
#6780: merge with 3.2.
This commit is contained in:
commit
bf1253b25a
6 changed files with 53 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue