pythonbible icon indicating copy to clipboard operation
pythonbible copied to clipboard

A few potential test fails?

Open christopherpickering opened this issue 1 year ago • 1 comments

Thanks again for this :)

I have a couple strings that produce errors/unexpected results. Are any of these valid as is?

import pythonbible as bible


tests = [
'Or, Micah. 2Ch. 34:20', # probably fails because of "Micah."
'Or, of. Psalm. 46, title.', # unsure
'Or, A psalm for Asaph to give instruction. Psalms. 74, title.', # unsure
'Or, anathema. 1 Corinthians 1Co. 16:22', # misses 2nd ref, because it things the 1 on "1Co." goes with the first ref? maybe ok?
'Or, loving to the brethren. 1Peter 1Pe. 1:22', # same as above
'1Peter. 1:22' # no ref found here. if there is a dot after a full book name, we don't get matches.
]

for text in tests:
    try:
        references = bible.get_references(text)

        print(references)
    except BaseException as e:
        print(e)

christopherpickering avatar Jun 14 '24 12:06 christopherpickering

The first three I'm not yet sure what's happening, and I will need to research. The fourth and fifth are known issues that I've got an open "bug" issue for but haven't yet fixed. The last one is working a little better in my latest code in development but is still not completely correct (it returns the whole book instead of the specific verse in the reference). I'll create a new branch with these tests (thanks so much for the very helpful tests, btw), and will start working on fixing them.

Thanks for reporting these errors!

avendesora avatar Jul 30 '24 16:07 avendesora