Closed canklot closed 2 years ago
Base: 80.58% // Head: 80.58% // No change to project coverage :thumbsup:
Coverage data is based on head (
f25d71b
) compared to base (7dd1609
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Is the error because the checksum contains letters? Never mind, the checksum can't have letters either.
This merely changes the error raised to be the correct one, if I understand correctly, right?
This merely changes the error raised to be the correct one, if I understand correctly, right?
Yes instead of getting invalid literal for int() with base 10:
now it returns IllegalCharacterError('EAN code can only contain numbers.')
Makes sense, thanks
Moved
super().__init__
before calling_calculate_checksum()
to check if the string contains any letters to prevent value errors that can happen when calculating checksum. I tested the new version with the input0132354187
and the produced barcode before and after the commit is the same as9780132352
.