Skip to content

Commit

Permalink
alterado codigo teste
Browse files Browse the repository at this point in the history
  • Loading branch information
royopa committed Feb 12, 2017
1 parent 2a445bf commit d69402e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ install:
- pip install coveralls

script:
- python ./test/example.py
- cd test && python ./example.py
- coverage run --source=python-cobol setup.py test

after_success:
Expand Down
10 changes: 5 additions & 5 deletions python-cobol/cobol.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def clean_cobol(lines):


if len(holder) > 0:
print "[WARNING] probably invalid COBOL - found unfinished line: ", " ".join(holder)
print("[WARNING] probably invalid COBOL - found unfinished line: ", " ".join(holder))

return output

Expand All @@ -100,7 +100,7 @@ def parse_cobol(lines):
match = CobolPatterns.row_pattern.match(row.strip())

if not match:
print "Found unmatched row", row.strip()
print("Found unmatched row", row.strip())
continue

match = match.groupdict()
Expand All @@ -122,7 +122,7 @@ def parse_cobol(lines):

match['redefines'] = None
except IndexError:
print "Could not find the field to be redefined ({}) for row: {}".format(match['redefines'], row.strip())
print("Could not find the field to be redefined ({}) for row: {}".format(match['redefines'], row.strip()))

output.append(match)

Expand Down Expand Up @@ -290,7 +290,7 @@ def print_cobol(lines):
outp += (80-len(outp)) * ' '
output.append(outp)

print "\n".join(output)
print("\n".join(output))

if __name__ == '__main__':
import argparse
Expand All @@ -306,7 +306,7 @@ def print_cobol(lines):
args = parser.parse_args()

if not os.path.isfile(args.filename):
print "Could not find", args.filename
print("Could not find", args.filename)
exit()

with open(args.filename,'r') as f:
Expand Down

0 comments on commit d69402e

Please sign in to comment.