Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test suite #796

Merged
merged 2 commits into from
Aug 17, 2024
Merged

Fix test suite #796

merged 2 commits into from
Aug 17, 2024

Conversation

gouttegd
Copy link
Contributor

This PR fixes two issues with the test suite.

The first (#794) is that the test suite fails if gilda and/or semsimian are not installed in the environment, even though those modules are optional dependencies and as such not installed by a standard poetry install command. This PR fixes that by detecting the absence of those modules and skipping the corresponding tests, instead of letting them fail.

The second (#795) is that the test_annotate_file file may fail because of unexpected warnings emitted by the annotate command, even if the command runs normally and produces the expected output file. This PR fixes that by making the test ignore any WARNING line when checking the STDERR output of the command.

(That second fix is based on the assumption that we don’t actually care about those warnings, as long as the command does what is expected of it. If that is not the case – if it is instead important to test that annotate does not produce any warning, then obviously the proposed fix is wrong and we should instead figure out where those warnings are emitted to shut them off.)

The `gilda` and `semsimian` modules are optional dependencies, but the
tests that depend do not expect that they may not be present and error
out if they cannot be imported.

Since they are optional, their absence should not cause the test suite
to fail, so this commit ensures that the corresponding tests are
properly skipped if the optional modules are not found.

closes INCATools#794
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 INCATools#795.
@cmungall cmungall merged commit ed29c27 into INCATools:main Aug 17, 2024
9 checks passed
@gouttegd gouttegd deleted the fix-test-suite branch August 17, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants