Skip to content

Commit

Permalink
otk/command: fix racecondition in tests
Browse files Browse the repository at this point in the history
Sometimes in my local IDE testing, the lazy close
of the dst file, leads to the test failing because it's
not (yet) seeing the result.
So we'll close, is when done.
  • Loading branch information
schuellerf committed Oct 18, 2024
1 parent bd40475 commit 0c179e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/otk/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def _process(arguments: argparse.Namespace, dry_run: bool) -> int:
# and then output by writing to the output
if not dry_run:
dst.write(doc.as_target_string())
if arguments.output is not None:
dst.close()

return 0

Expand Down

0 comments on commit 0c179e1

Please sign in to comment.