Skip to content

Commit

Permalink
[fuzz] Remove condition that referred to non-existing variable `targe…
Browse files Browse the repository at this point in the history
…t_ansfile`
  • Loading branch information
mpsijm committed Feb 3, 2024
1 parent 4ba826e commit d53e1b2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bin/fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _run(self, bar):
localbar = bar.start(f'{self.i}: generate')
result = self.generator.run(localbar, cwd, name, self.seed)
if result.ok is not True:
return False # No need to call bar.done() in this case, because the Generator calls bar.error()
return False # No need to call bar.done() in this case, because the Generator calls bar.error()
localbar.done()

testcase = run.Testcase(self.fuzz.problem, infile, short_path=Path(dir) / (name + '.in'))
Expand Down Expand Up @@ -86,9 +86,8 @@ def _run(self, bar):
return False
localbar.done()
else:
if not target_ansfile.is_file():
bar.error(f'{self.i}: {ansfile.name} does not exist and was not generated.')
return False
bar.error(f'{self.i}: {ansfile.name} does not exist and was not generated.')
return False
else:
if not testcase.ans_path.is_file():
testcase.ans_path.write_text('')
Expand Down

0 comments on commit d53e1b2

Please sign in to comment.