Capitains / MyCapytain

Texts API and Textual Resources Utility Library for Python 3
http://mycapytain.readthedocs.org
Mozilla Public License 2.0
8 stars 9 forks source link

Corrected a problem with siblingsId throwing an IndexError #200

Closed sonofmun closed 4 years ago

sonofmun commented 4 years ago

An example of when this error is thrown can be seen in the test that I have added. What is happening here is that the range_length is 7, end is 7, and len(document_reference) is 14. That means that end + range_length == len(document_references). That means that the elif statement does not fire and it goes to else, which errors because it tries to call document_references[end + range_length], which would be document_references[14], which doesn't exist. This change should correct the problem.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 94.116% when pulling a70eb963420918bf80c6ead03ababbb421a6bc9d on correction_siblingsId into 3ff0f27e514f5895d4f83dbe294d4035a9e4dc53 on dev.

PonteIneptique commented 4 years ago

Sorry for the delay !