Skip to content

Commit

Permalink
Changed method to mutate a line of code
Browse files Browse the repository at this point in the history
  • Loading branch information
dsandeephegde committed Nov 6, 2017
1 parent c2d46c3 commit 6688b8a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions python/servo/mutation/test.py
Expand Up @@ -14,11 +14,10 @@


def mutate_line(file_name, line_number):
lines = open(file_name, 'r').readlines()
lines[line_number - 1] = re.sub(r'\s&&\s', ' || ', lines[line_number - 1])
out = open(file_name, 'w')
out.writelines(lines)
out.close()
for line in fileinput.input(file_name, inplace=True):
if(fileinput.lineno() == line_number):
line = re.sub(r'\s&&\s', ' || ', line)
print line.rstrip()


def mutation_test(file_name, tests):
Expand Down

0 comments on commit 6688b8a

Please sign in to comment.