mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 06:46:13 +00:00
61ce5521a8
- Move kjv.py and server files into kjvstudy package directory - Add package __init__.py with module imports - Move tests to tests/ directory with path configuration - Add .envrc to prevent Python bytecode generation - Update imports to use relative imports within package - Create global bible instance for reuse across modules
22 lines
715 B
Python
22 lines
715 B
Python
# PATH HACK
|
|
import os
|
|
import sys
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
|
|
|
from kjvstudy.kjv import VerseReference
|
|
|
|
def test_verse_references():
|
|
# Test the parsing of a verse reference string
|
|
assert VerseReference.from_string("Genesis 1:1") == VerseReference(
|
|
book="Genesis", chapter=1, verse=1
|
|
)
|
|
assert VerseReference.from_string("I Corinthians 1:1") == VerseReference(
|
|
book="I Corinthians", chapter=1, verse=1
|
|
)
|
|
assert VerseReference.from_string("John 3:16") == VerseReference(
|
|
book="John", chapter=3, verse=16
|
|
)
|
|
assert VerseReference.from_string("Matthew 5:14") == VerseReference(
|
|
book="Matthew", chapter=5, verse=14
|
|
)
|