-
Notifications
You must be signed in to change notification settings - Fork 25
/
test_nrc.py
24 lines (19 loc) · 1.05 KB
/
test_nrc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from myanmar import nrc as nm
def test_is_valid_nrc():
assert nm.is_valid_nrc('15/pmn(n)123456') is False
assert nm.is_valid_nrc('5/pmn(n)123456') is False
assert nm.is_valid_nrc('9/pmn(t)123456') is False
assert nm.is_valid_nrc('1/ygn(n)123456') is False
assert nm.is_valid_nrc('9/pmn(n)123456') is True
assert nm.is_valid_nrc('9/pmn(p)123456') is True
assert nm.is_valid_nrc('9/pmn(e)123456') is True
assert nm.is_valid_nrc('9/pamana(naing)123456') is True
assert nm.is_valid_nrc('9/pa ma na(naing)123456') is True
assert nm.is_valid_nrc('9/p m n(naing) 123456') is True
def test_normalize_nrc():
assert nm.normalize_nrc('9/pmn(n)123456') == '9 pamana n 123456'
assert nm.normalize_nrc('9/pamana(p)123456') == '9 pamana p 123456'
assert nm.normalize_nrc('9/pmn(naing)123456') == '9 pamana n 123456'
assert nm.normalize_nrc('9/p m n(naing)123456') == '9 pamana n 123456'
assert nm.normalize_nrc('9/pa ma na (n)123456') == '9 pamana n 123456'
assert nm.normalize_nrc('9/pmn(pyu)123456') == '9 pamana p 123456'