summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2018-01-19 13:39:07 +0200
committerAarni Koskela <akx@iki.fi>2018-01-19 17:44:26 +0200
commitbd2ac889827f55fc6d48b3e63fa38e3c090f8892 (patch)
treea1bc5de9f712463cad5d95c9acd03a92041b1223 /tests
parentff7e3d2e74ff2c271294ae850f5fa139ce981488 (diff)
downloadbabel-bd2ac889827f55fc6d48b3e63fa38e3c090f8892.tar.gz
Lists: add support for various list styles other than the default
This was inspired by the CLDR 32 release notes: > New “disjunctive” list style (eg “a, b, or c”)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_lists.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_lists.py b/tests/test_lists.py
index bd297ec..e843a63 100644
--- a/tests/test_lists.py
+++ b/tests/test_lists.py
@@ -1,4 +1,6 @@
# coding=utf-8
+import pytest
+
from babel import lists
@@ -12,3 +14,8 @@ def test_format_list():
(['string1', 'string2', 'string3', 'string4'], 'ne', u'string1,string2, string3 र string4'),
]:
assert lists.format_list(list, locale=locale) == expected
+
+
+def test_format_list_error():
+ with pytest.raises(ValueError):
+ lists.format_list(['a', 'b', 'c'], style='orange', locale='en')