|
@@ -0,0 +1,76 @@
|
|
1
|
+import million.analyze.count_analysis as ca
|
|
2
|
+from test.TestCase import TestCase
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+class TypoTest(TestCase):
|
|
6
|
+
|
|
7
|
+ def test_missing_letter_1(self, overrides=None, exclude=None):
|
|
8
|
+ assert ca.check_extra_or_missing_letter("4976", "45976") == True
|
|
9
|
+
|
|
10
|
+ def test_missing_letter_2(self, overrides=None, exclude=None):
|
|
11
|
+ assert ca.check_extra_or_missing_letter("4596", "45976") == True
|
|
12
|
+
|
|
13
|
+ def test_missing_letter_3(self, overrides=None, exclude=None):
|
|
14
|
+ assert ca.check_extra_or_missing_letter("5976", "45976") == True
|
|
15
|
+
|
|
16
|
+ def test_missing_letter_4(self, overrides=None, exclude=None):
|
|
17
|
+ assert ca.check_extra_or_missing_letter("4597", "45976") == True
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+ def test_extra_letter_1(self, overrides=None, exclude=None):
|
|
22
|
+ assert ca.check_extra_or_missing_letter("459766", "45976") == True
|
|
23
|
+
|
|
24
|
+ def test_extra_letter_2(self, overrides=None, exclude=None):
|
|
25
|
+ assert ca.check_extra_or_missing_letter("545976", "45976") == True
|
|
26
|
+
|
|
27
|
+ def test_extra_letter_3(self, overrides=None, exclude=None):
|
|
28
|
+ assert ca.check_extra_or_missing_letter("452976", "45976") == True
|
|
29
|
+
|
|
30
|
+ def test_extra_letter_4(self, overrides=None, exclude=None):
|
|
31
|
+ assert ca.check_extra_or_missing_letter("459776", "45976") == True
|
|
32
|
+
|
|
33
|
+ def test_extra_letter_5(self, overrides=None, exclude=None):
|
|
34
|
+ assert ca.check_extra_or_missing_letter("45976", "45976") == False
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+ def test_single_letter_differ_1(self, overrides=None, exclude=None):
|
|
38
|
+ assert ca.check_single_letter_differ("35976", "45976") == True
|
|
39
|
+
|
|
40
|
+ def test_single_letter_differ_2(self, overrides=None, exclude=None):
|
|
41
|
+ assert ca.check_single_letter_differ("45986", "45976") == True
|
|
42
|
+
|
|
43
|
+ def test_single_letter_differ_3(self, overrides=None, exclude=None):
|
|
44
|
+ assert ca.check_single_letter_differ("44986", "45976") == False
|
|
45
|
+
|
|
46
|
+ def test_single_letter_differ_4(self, overrides=None, exclude=None):
|
|
47
|
+ assert ca.check_single_letter_differ("35975", "45976") == False
|
|
48
|
+
|
|
49
|
+ def test_single_letter_differ_5(self, overrides=None, exclude=None):
|
|
50
|
+ assert ca.check_single_letter_differ("4976", "45976") == False
|
|
51
|
+
|
|
52
|
+ def test_single_letter_differ_6(self, overrides=None, exclude=None):
|
|
53
|
+ assert ca.check_single_letter_differ("4597", "45976") == False
|
|
54
|
+
|
|
55
|
+ def test_single_letter_differ_7(self, overrides=None, exclude=None):
|
|
56
|
+ assert ca.check_single_letter_differ("45976", "45976") == False
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+ def test_letter_swap_1(self, overrides=None, exclude=None):
|
|
61
|
+ assert ca.check_letter_swap("45976", "45976") == False
|
|
62
|
+
|
|
63
|
+ def test_letter_swap_2(self, overrides=None, exclude=None):
|
|
64
|
+ assert ca.check_letter_swap("49576", "45976") == True
|
|
65
|
+
|
|
66
|
+ def test_letter_swap_3(self, overrides=None, exclude=None):
|
|
67
|
+ assert ca.check_letter_swap("45967", "45976") == True
|
|
68
|
+
|
|
69
|
+ def test_letter_swap_4(self, overrides=None, exclude=None):
|
|
70
|
+ assert ca.check_letter_swap("47956", "45976") == False
|
|
71
|
+
|
|
72
|
+ def test_letter_swap_5(self, overrides=None, exclude=None):
|
|
73
|
+ assert ca.check_letter_swap("54966", "45976") == False
|
|
74
|
+
|
|
75
|
+ def test_letter_swap_6(self, overrides=None, exclude=None):
|
|
76
|
+ assert ca.check_letter_swap("54967", "45976") == False
|