Skip to content

Commit f047b94

Browse files
committed
implementes test_1611_booknames and begins test_deuterocanon_booknames
1 parent 3ac42b5 commit f047b94

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import unittest
2+
3+
from ..texts.kjv1611 import KingJames1611
4+
5+
kjv1611 = KingJames1611()
6+
7+
def f(txt):
8+
"""
9+
accept a string containing a scripture reference, normalize it, and then
10+
return the reformatted string
11+
"""
12+
return kjv1611.reference_to_string(
13+
*kjv1611.normalize_reference(*kjv1611.scripture_re.match(txt).groups()))
14+
15+
class Test1611BookNames(unittest.TestCase):
16+
def setUp(self):
17+
pass
18+
19+
# A single old testament book - just to prove the 1611 is pulling in OT texts
20+
def test_genesis(self):
21+
self.assertEqual(f('genesis 1:1'), 'Genesis 1:1')
22+
self.assertEqual(f('gen 1:1'), 'Genesis 1:1')
23+
24+
# /Old Testament
25+
26+
# New Testament
27+
28+
# A single new testament book - just to prove the 1611 is pulling in NT texts
29+
def test_matthew(self):
30+
self.assertEqual(f('matthew 1:1'), 'Matthew 1:1')
31+
self.assertEqual(f('matt 1:1'), 'Matthew 1:1')
32+
33+
# /New Testament
34+
35+
# Apocryphal Books
36+
37+
def test_i_esdras(self):
38+
self.assertEqual(f('I esdras 1:1'), 'I Esdras 1:1')
39+
self.assertEqual(f('1 esdras 1:1'), 'I Esdras 1:1')
40+
self.assertEqual(f('1 esd 1:1'), 'I Esdras 1:1')
41+
42+
def test_ii_esdras(self):
43+
self.assertEqual(f('II esdras 1:1'), 'II Esdras 1:1')
44+
self.assertEqual(f('2 esdras 1:1'), 'II Esdras 1:1')
45+
self.assertEqual(f('2 esd 1:1'), 'II Esdras 1:1')
46+
47+
48+
# A single deutoronomical book - just to prove the 1611 is pulling in deutorocanon texts
49+
def test_tobit(self):
50+
self.assertEqual(f('tobit 1:1'), 'Tobit 1:1')
51+
self.assertEqual(f('tob 1:1'), 'Tobit 1:1')
52+
53+
# The remaining Deutoronimcal books are tested in the test_deutoronocanon_booknames
54+
55+
# /Apocryphal Books
56+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import unittest
2+
3+
from ..texts.deuterocanon import Deuterocanon
4+
5+
dc=Deuterocanon()
6+
7+
def f(txt):
8+
"""
9+
accept a string containing a scripture reference, normalize it, and then
10+
return the reformatted string
11+
"""
12+
return dc.reference_to_string(
13+
*dc.normalize_reference(*dc.scripture_re.match(txt).groups()))
14+
15+
class TestDeuterocanonBookNames(unittest.TestCase):
16+
def setUp(self):
17+
pass
18+
19+
def test_tobit(self):
20+
self.assertEqual(f('tobit 1:1'), 'Tobit 1:1')
21+
self.assertEqual(f('tob 1:1'), 'Tobit 1:1')
22+
23+
def test_judith(self):
24+
# TODO
25+
raise Exception('Not yet implemented')
26+
27+
def test_additions_to_esther(self):
28+
# TODO
29+
raise Exception('Not yet implemented')
30+
31+
def test_wisdom_of_solomon(self):
32+
# TODO
33+
raise Exception('Not yet implemented')
34+
35+
def test_ecclesiasticus_aka_sirach(self):
36+
# TODO
37+
raise Exception('Not yet implemented')
38+
39+
def test_baruch(self):
40+
# TODO
41+
raise Exception('Not yet implemented')
42+
43+
def test_letter_of_jeremiah(self):
44+
# TODO
45+
raise Exception('Not yet implemented')
46+
47+
def testprayer_of_azariah(self):
48+
# TODO
49+
raise Exception('Not yet implemented')
50+
51+
def test_susanna(self):
52+
# TODO
53+
raise Exception('Not yet implemented')
54+
55+
def test_bel_and_the_dragon(self):
56+
# TODO
57+
raise Exception('Not yet implemented')
58+
59+
def test_prayer_of_manasseh(self):
60+
# TODO
61+
raise Exception('Not yet implemented')
62+
63+
def test_1_maccabees(self):
64+
# TODO
65+
raise Exception('Not yet implemented')
66+
67+
def test_2_maccabees(self):
68+
# TODO
69+
raise Exception('Not yet implemented')
70+

0 commit comments

Comments
 (0)