Closed juhoinkinen closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.64%. Comparing base (
1ba7912
) to head (5033b4c
). Report is 78 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'm actually unsure if I'm using the error message prefix formatting correctly or is it not working? Now the beginning part is a bit weird in the message:
Error: Operation failed backend 'nn_ensemble': loading...
I'm actually unsure if I'm using the error message prefix formatting correctly or is it not working? Now the beginning part is a bit weird in the message:
Error: Operation failed backend 'nn_ensemble': loading...
I agree it looks weird, but it's formatted here: https://github.com/NatLibFi/Annif/blob/1b201dcd7d96eb81d0b8aad8f72703fcf9caf74e/annif/exception.py#L35-L37
The test for the failed reading of metadata from model file does not pass in CICD on Python 3.9, while it passes on Python 3.11 and on my laptop.
The issue is in log capturing:
> assert "Failed to read metadata from " in caplog.text
E AssertionError: assert 'Failed to read metadata from ' in ''
E + where '' = <_pytest.logging.LogCaptureFixture object at 0x7fd31603c460>.text
tests/test_backend_nn_ensemble.py:236: AssertionError
----------------------------- Captured stderr call -----------------------------
warning: Backend nn_ensemble: Failed to read metadata from tests/data/projects/dummy-en/nonexistent.zip
The log message is not so important to test, so I'll just remove the assert for it.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
The new error message shows
See for example the last line of the following:
Closes #784.