Skip to content

Commit

Permalink
Prevent spurious warnings from causing test failure.
Browse files Browse the repository at this point in the history
The `test_annotate_file` command may fail because the `annotate` command
may emit some unexpected warnings on STDERR about invalid CURIEs, even
if there are no errors and the expected output is normally produced on
STDOUT.

This commit amends the test so that it ignores any 'WARNING:' line in
the STDERR stream produced by the `annotate` command.

closes #795.
  • Loading branch information
gouttegd committed Aug 16, 2024
1 parent 640d5a7 commit 78e5b66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ def test_annotate_file(self):
],
)
print("STDERR", result.stdout)
err = result.stderr
err = "\n".join([line for line in result.stderr.split("\n") if not line.startswith("WARNING")])
self.assertEqual("", err)
self.assertEqual(0, result.exit_code)
with open(outfile) as stream:
Expand Down

0 comments on commit 78e5b66

Please sign in to comment.