-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bible_test.py
73 lines (67 loc) · 1.26 KB
/
bible_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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from bible import bible_book_word_count_by_chapter
def test_bible_book_word_count_by_chapter_1():
result = bible_book_word_count_by_chapter('leviticus', 'atonement')
assert isinstance(result, dict)
assert result == {
1: 1,
2: 0,
3: 0,
4: 4,
5: 5,
6: 1,
7: 1,
8: 1,
9: 2,
10: 1,
11: 0,
12: 2,
13: 0,
14: 7,
15: 2,
16: 15,
17: 2,
18: 0,
19: 1,
20: 0,
21: 0,
22: 0,
23: 3,
24: 0,
25: 1,
26: 0,
27: 0,
}
result = bible_book_word_count_by_chapter('leviticus')
assert isinstance(result, dict)
assert result == {
1: 528,
2: 489,
3: 515,
4: 1160,
5: 724,
6: 892,
7: 1061,
8: 993,
9: 627,
10: 628,
11: 1115,
12: 262,
13: 1857,
14: 1717,
15: 920,
16: 1160,
17: 553,
18: 684,
19: 898,
20: 849,
21: 587,
22: 885,
23: 1223,
24: 554,
25: 1535,
26: 1246,
27: 960,
}
# todo: write more tests