Update of /cvsroot/pythonreports/PythonReports/PythonReports
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30887
Modified Files:
barcode.py
Log Message:
fix doctests (no quet zones encoded)
Index: barcode.py
===================================================================
RCS file: /cvsroot/pythonreports/PythonReports/PythonReports/barcode.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** barcode.py 1 Nov 2006 11:01:02 -0000 1.1
--- barcode.py 7 Nov 2006 13:16:42 -0000 1.2
***************
*** 1,4 ****
--- 1,5 ----
"""BarCode routines"""
"""History:
+ 07-nov-2006 [als] fix doctests (no quet zones encoded)
22-sep-2006 [als] encoding calls return sequences w/o quiet zones;
added .add_qz(), .min_height()
***************
*** 152,162 ****
>>> code2of5i("25")
! (10, 1, 1, 1, 1, 1, 3, 3, 1, 1, 3, 1, 1, 3, 1, 3, 1, 1, 10)
>>> code2of5i("5")
! (10, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3, 1, 1, 1, 3, 1, 1, 10)
>>> print textwrap.fill(repr(code2of5i("19980726")), 64)
! (10, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 1,
! 3, 3, 1, 1, 1, 1, 1, 1, 3, 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 3, 1,
! 1, 3, 1, 3, 1, 1, 10)
Check digit examples:
--- 153,163 ----
>>> code2of5i("25")
! (1, 1, 1, 1, 1, 3, 3, 1, 1, 3, 1, 1, 3, 1, 3, 1, 1)
>>> code2of5i("5")
! (1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3, 1, 1, 1, 3, 1, 1)
>>> print textwrap.fill(repr(code2of5i("19980726")), 64)
! (1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 1, 3,
! 3, 1, 1, 1, 1, 1, 1, 3, 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 3, 1, 1,
! 3, 1, 3, 1, 1)
Check digit examples:
***************
*** 264,272 ****
>>> print textwrap.fill(repr(Code39(gap=2)("BARCODE1")), 64)
! (10, 1, 3, 1, 1, 3, 1, 3, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 1, 3, 2,
! 3, 1, 1, 1, 1, 3, 1, 1, 3, 2, 3, 1, 1, 1, 1, 1, 3, 3, 1, 2, 3,
! 1, 3, 1, 1, 3, 1, 1, 1, 2, 3, 1, 1, 1, 3, 1, 1, 3, 1, 2, 1, 1,
! 1, 1, 3, 3, 1, 1, 3, 2, 3, 1, 1, 1, 3, 3, 1, 1, 1, 2, 3, 1, 1,
! 3, 1, 1, 1, 1, 3, 2, 1, 3, 1, 1, 3, 1, 3, 1, 1, 10)
>>> code39.check_digit("BARCODE1")
--- 265,273 ----
>>> print textwrap.fill(repr(Code39(gap=2)("BARCODE1")), 64)
! (1, 3, 1, 1, 3, 1, 3, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 1, 3, 2, 3,
! 1, 1, 1, 1, 3, 1, 1, 3, 2, 3, 1, 1, 1, 1, 1, 3, 3, 1, 2, 3, 1,
! 3, 1, 1, 3, 1, 1, 1, 2, 3, 1, 1, 1, 3, 1, 1, 3, 1, 2, 1, 1, 1,
! 1, 3, 3, 1, 1, 3, 2, 3, 1, 1, 1, 3, 3, 1, 1, 1, 2, 3, 1, 1, 3,
! 1, 1, 1, 1, 3, 2, 1, 3, 1, 1, 3, 1, 3, 1, 1)
>>> code39.check_digit("BARCODE1")
***************
*** 424,442 ****
>>> print textwrap.fill(repr(code128("Code 128")), 64)
! (10, 2, 1, 1, 2, 1, 4, 1, 3, 1, 3, 2, 1, 1, 3, 4, 1, 1, 1, 1, 4,
! 1, 2, 2, 1, 1, 1, 2, 2, 1, 4, 2, 1, 2, 2, 2, 2, 1, 2, 3, 2, 2,
! 1, 2, 2, 3, 2, 1, 1, 3, 1, 1, 2, 2, 2, 1, 1, 1, 4, 2, 2, 2, 3,
! 3, 1, 1, 1, 2, 10)
>>> print textwrap.fill(repr(code128("\rx")), 64)
! (10, 2, 1, 1, 4, 1, 2, 4, 1, 3, 1, 1, 1, 1, 1, 4, 1, 3, 1, 4, 2,
! 1, 2, 1, 1, 3, 2, 1, 2, 2, 1, 2, 3, 3, 1, 1, 1, 2, 10)
>>> print textwrap.fill(repr(code128("0123456789")), 64)
! (10, 2, 1, 1, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 1, 2, 1, 3, 1, 1, 1,
! 3, 1, 2, 3, 1, 4, 1, 1, 2, 2, 2, 1, 2, 1, 4, 1, 1, 4, 2, 1, 1,
! 2, 2, 3, 3, 1, 1, 1, 2, 10)
>>> print textwrap.fill(repr(code128("01234\\n")), 64)
! (10, 2, 1, 1, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 1, 2, 1, 3, 1, 3, 1,
! 1, 1, 4, 1, 2, 2, 1, 2, 3, 1, 1, 4, 2, 2, 1, 1, 1, 2, 1, 1, 4,
! 2, 2, 3, 3, 1, 1, 1, 2, 10)
"""
--- 425,443 ----
>>> print textwrap.fill(repr(code128("Code 128")), 64)
! (2, 1, 1, 2, 1, 4, 1, 3, 1, 3, 2, 1, 1, 3, 4, 1, 1, 1, 1, 4, 1,
! 2, 2, 1, 1, 1, 2, 2, 1, 4, 2, 1, 2, 2, 2, 2, 1, 2, 3, 2, 2, 1,
! 2, 2, 3, 2, 1, 1, 3, 1, 1, 2, 2, 2, 1, 1, 1, 4, 2, 2, 2, 3, 3,
! 1, 1, 1, 2)
>>> print textwrap.fill(repr(code128("\rx")), 64)
! (2, 1, 1, 4, 1, 2, 4, 1, 3, 1, 1, 1, 1, 1, 4, 1, 3, 1, 4, 2, 1,
! 2, 1, 1, 3, 2, 1, 2, 2, 1, 2, 3, 3, 1, 1, 1, 2)
>>> print textwrap.fill(repr(code128("0123456789")), 64)
! (2, 1, 1, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 1, 2, 1, 3, 1, 1, 1, 3,
! 1, 2, 3, 1, 4, 1, 1, 2, 2, 2, 1, 2, 1, 4, 1, 1, 4, 2, 1, 1, 2,
! 2, 3, 3, 1, 1, 1, 2)
>>> print textwrap.fill(repr(code128("01234\\n")), 64)
! (2, 1, 1, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 1, 2, 1, 3, 1, 3, 1, 1,
! 1, 4, 1, 2, 2, 1, 2, 3, 1, 1, 4, 2, 2, 1, 1, 1, 2, 1, 1, 4, 2,
! 2, 3, 3, 1, 1, 1, 2)
"""
|