summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_format.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
index d2744cd..9653e46 100644
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -428,13 +428,16 @@ class FormatTest(unittest.TestCase):
localeconv = locale.localeconv()
sep = localeconv['thousands_sep']
point = localeconv['decimal_point']
+ grouping = localeconv['grouping']
text = format(123456789, "n")
- self.assertIn(sep, text)
+ if grouping:
+ self.assertIn(sep, text)
self.assertEqual(text.replace(sep, ''), '123456789')
text = format(1234.5, "n")
- self.assertIn(sep, text)
+ if grouping:
+ self.assertIn(sep, text)
self.assertIn(point, text)
self.assertEqual(text.replace(sep, ''), '1234' + point + '5')
finally: