This PR introduces changes to silence a warning ska_helpers.version emits whenever it can't figure out the version. In particular, this warning is emitted during testr runs. The resulting warning is then misinterpreted as a failure.
Strictly speaking, the warning is correct, because pytest seems to be importing the module incorrectly. It does that while climbing the directory tree until it finds the root of the package. In the end, it does the right import and everything is ok. At this point the warning was emitted already.
These are possible solutions:
silence the warning when a TESTR_ variable is in os.environ.
set a specific environment variable to silence this warning.
Modify the log parsing tests to correctly interpret and skip this warning.
have ska_helpers.version climb the directory tree to find its root.
This PR implements the first option. Second could also be. I would hesitate to implement the fourth.
Testing
[x] Passes unit tests on MacOS, linux, Windows (at least one required)
[x] Functional testing: runtestr passes when doing it on Ska.Shell.
Description
This PR introduces changes to silence a warning ska_helpers.version emits whenever it can't figure out the version. In particular, this warning is emitted during testr runs. The resulting warning is then misinterpreted as a failure.
Strictly speaking, the warning is correct, because pytest seems to be importing the module incorrectly. It does that while climbing the directory tree until it finds the root of the package. In the end, it does the right import and everything is ok. At this point the warning was emitted already.
These are possible solutions:
This PR implements the first option. Second could also be. I would hesitate to implement the fourth.
Testing
Fixes #