Commits

Charlie Clark  committed f20b720 Draft

Python 3 compatibility.
NB. we should start using Python 3 syntax in the compatibility library.

  • Participants
  • Parent commits d581271
  • Branches 1.9

Comments (0)

Files changed (1)

File openpyxl/cell/tests/test_cell.py

 
 def test_illegal_chacters():
     from openpyxl.exceptions import IllegalCharacterError
+    from openpyxl.compat import xrange
+    from itertools import chain
     ws = build_dummy_worksheet()
     cell = Cell(ws, 'A', 1)
 
     # The bytes 0x00 through 0x1F inclusive must be manually escaped in values.
 
-    illegal_chrs = range(9) + range(11, 13) + range(14, 32)
+    illegal_chrs = chain(xrange(9), xrange(11, 13), xrange(14, 32))
     for i in illegal_chrs:
         with pytest.raises(IllegalCharacterError):
             cell.value = chr(i)