-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathngram_test.py
36 lines (27 loc) · 916 Bytes
/
ngram_test.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
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/python
import random
import sys
import ngram as ng
def main(argv):
t2()
def t2():
assert tuple(ng.fuzzy_queries((1, 2, 3, 4))) == (
(1, 2, 3, 4),
(ng.not_found, 2, 3, 4),
(1, ng.not_found, 3, 4),
(ng.not_found, ng.not_found, 3, 4),
(1, 2, ng.not_found, 4),
(ng.not_found, 2, ng.not_found, 4),
(1, ng.not_found, ng.not_found, 4),
(ng.not_found, ng.not_found, ng.not_found, 4),
(1, 2, 3, ng.not_found),
(ng.not_found, 2, 3, ng.not_found),
(1, ng.not_found, 3, ng.not_found),
(ng.not_found, ng.not_found, 3, ng.not_found),
(1, 2, ng.not_found, ng.not_found),
(ng.not_found, 2, ng.not_found, ng.not_found),
(1, ng.not_found, ng.not_found, ng.not_found),
(ng.not_found, ng.not_found, ng.not_found, ng.not_found),
)
if __name__ == '__main__':
main(sys.argv)