Skip to content

Commit 31a670b

Browse files
xiehuanyinandgator
authored andcommitted
Fix concatenated Som and Bengali currency symbols
1 parent f3e1206 commit 31a670b

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎src/validators/country.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
_currency_symbols = {
220220
# https://en.wikipedia.org/wiki/Currency_sign_(generic)
221221
"؋", "฿", "₵", "₡", "¢", "$", "₫", "֏", "€", "ƒ", "₣", "₲", "₴", "₭", "₾", "£", "₺", "₼", "₦",
222-
"₱", "元", "圆", "圓", "﷼", "៛", "₽", "₹", "रू", "රු", "૱", "௹", "꠸", "Rs", "₪", "⃀" "৳", "₸",
222+
"₱", "元", "圆", "圓", "﷼", "៛", "₽", "₹", "रू", "රු", "૱", "௹", "꠸", "Rs", "₪", "⃀", "৳", "₸",
223223
"₮", "₩", "¥", "円", "₿", "¤"
224224
}
225225
# fmt: on

‎tests/test_country.py‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def test_returns_failed_validation_on_invalid_country_code(value: str, iso_forma
5656

5757

5858
@pytest.mark.parametrize(
59-
("value", "skip_symbols", "ignore_case"), [("$", False, False), ("uSd", True, True)]
59+
("value", "skip_symbols", "ignore_case"),
60+
[("$", False, False), ("⃀", False, False), ("৳", False, False), ("uSd", True, True)],
6061
)
6162
def test_returns_true_on_valid_currency(value: str, skip_symbols: bool, ignore_case: bool):
6263
"""Test returns true on valid currency."""
@@ -65,7 +66,14 @@ def test_returns_true_on_valid_currency(value: str, skip_symbols: bool, ignore_c
6566

6667
@pytest.mark.parametrize(
6768
("value", "skip_symbols", "ignore_case"),
68-
[("$", True, False), ("uSd", True, False), ("Bucks", True, True)],
69+
[
70+
("$", True, False),
71+
("⃀", True, False),
72+
("৳", True, False),
73+
("⃀৳", False, False),
74+
("uSd", True, False),
75+
("Bucks", True, True),
76+
],
6977
)
7078
def test_returns_failed_validation_invalid_currency(
7179
value: str, skip_symbols: bool, ignore_case: bool

0 commit comments

Comments
 (0)