before tests with StringIO fails def get_clean_source fh for xline in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## before
# tests with StringIO fails
def get_clean_source(fh):
for i, xline in enumerate(fh.xreadlines()):
line_number = i + 1
...
## after
def get_clean_source(fh):
for i, xline in enumerate(fh):
line_number = i + 1
...