File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,11 +200,11 @@ def render(self, code):
200200 xpos = self .quiet_zone
201201 bxs = xpos # x start of barcode
202202 text = {
203- "start" : [], # The x start of a guard
204- "end" : [], # The x end of a guard
205- "xpos" : [], # The x position where to write a text block
206- "was_guard" : False # Flag that indicates if the previous mod
207- # was part of an guard block
203+ "start" : [], # The x start of a guard
204+ "end" : [], # The x end of a guard
205+ "xpos" : [], # The x position where to write a text block
206+ # Flag that indicates if the previous mod was part of an guard block:
207+ "was_guard" : False ,
208208 }
209209 for mod in mlist :
210210 height_factor = mod [1 ]
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ def test_ean8_builds():
77 bc = ean .build ()
88 assert ref == bc [0 ]
99
10+
1011def test_ean8_builds_with_longer_bars ():
1112 ref = "G0G01000110001101001001101011110G0G01000100100010011100101001000G0G"
1213 ean = get_barcode ("ean8" , "40267708" , options = {"guardbar" : True })
1314 bc = ean .build ()
1415 assert ref == bc [0 ]
15-
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ def test_saving_svg_to_byteio():
3737 with open (f"{ TESTPATH } /somefile.svg" , "wb" ) as f :
3838 EAN13 ("100000011111" , writer = SVGWriter ()).write (f )
3939
40+
4041def test_saving_svg_to_byteio_with_guardbar ():
4142 rv = BytesIO ()
4243 EAN13 (str (100000902922 ), writer = SVGWriter (), guardbar = True ).write (rv )
4344
4445 with open (f"{ TESTPATH } /somefile_guardbar.svg" , "wb" ) as f :
4546 EAN13 ("100000011111" , writer = SVGWriter (), guardbar = True ).write (f )
46-
You can’t perform that action at this time.
0 commit comments