5
0
Fork 0

Fix get validation pattern, and update Hebrew test metod.

This commit is contained in:
Llewellyn van der Merwe 2023-12-11 12:01:46 +02:00
parent 37ab0589df
commit bc5d171b3c
Signed by: Llewellyn
GPG Key ID: A9201372263741E7
3 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
setup(
name="getbible",
version="1.1.1",
version="1.1.2",
author="Llewellyn van der Merwe",
author_email="getbible@vdm.io",
description="A Python package to retrieving Bible references with ease.",

View File

@ -28,7 +28,7 @@ class GetBible:
self.__chapters_cache = {}
self.__start_cache_reset_thread()
# Pattern to check valid translations names
self.__pattern = re.compile(r'^[a-zA-Z0-9]{1,30}$')
self.__pattern = re.compile(r'[a-zA-Z0-9]{1,30}')
# Determine if the repository path is a URL
self.__repo_path_url = self.__repo_path.startswith("http://") or self.__repo_path.startswith("https://")

View File

@ -67,7 +67,7 @@ class TestGetBible(unittest.TestCase):
self.assertEqual(actual_result, expected_result, "Failed to find 'Ge1:1;Jn1:1;1Jn1:1' scripture.")
def test_valid_multiple_reference_select_aleppo(self):
actual_result = self.getbible.select('Ge1:1-3;Ps1:1;ps1:1-2;Ge1:6-7,10', 'aleppo')
actual_result = self.getbible.select('ברא 1:1-3;תה 1:1;תה1:1-2;בְּרֵאשִׁית 1:6-7,10', 'aleppo')
expected_result = {
'aleppo_19_1': {'abbreviation': 'aleppo',
'book_name': 'תְּהִלִּים',
@ -79,7 +79,7 @@ class TestGetBible(unittest.TestCase):
'language': 'Hebrew',
'name': 'תְּהִלִּים 1',
'translation': 'Aleppo Codex',
'ref': ['Ps1:1', 'ps1:1-2'],
'ref': ['תה 1:1', 'תה1:1-2'],
'verses': [{'chapter': 1,
'name': 'תְּהִלִּים 1:1',
'text': '\xa0\xa0אשרי האיש— \xa0\xa0 אשר לא הלך '
@ -101,7 +101,7 @@ class TestGetBible(unittest.TestCase):
'language': 'Hebrew',
'name': 'בְּרֵאשִׁית 1',
'translation': 'Aleppo Codex',
'ref': ['Ge1:1-3', 'Ge1:6-7,10'],
'ref': ['ברא 1:1-3', 'בְּרֵאשִׁית 1:6-7,10'],
'verses': [{'chapter': 1,
'name': 'בְּרֵאשִׁית 1:1',
'text': 'בראשית ברא אלהים את השמים ואת הארץ ',