We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 996eaf9 commit da2c542Copy full SHA for da2c542
1 file changed
tests/test_ean.py
@@ -0,0 +1,11 @@
1
+from __future__ import annotations
2
+
3
+from barcode.ean import EAN13
4
5
6
+def test_ean_checksum() -> None:
7
+ ean = EAN13("842169142322") # input has 12 digits
8
+ assert ean.calculate_checksum() == 0
9
10
+ ean = EAN13("8421691423220") # input has 13 digits
11
0 commit comments