Tests use user configuration instead of default configuration
The user defined configuration influences test cases and can introduce errors. In one example, the user configuration contained erroneous values for the vertical range of the side view that were introduced on an experimental branch. These causes the tests in the stable branch to fail later on.
Comments (6)
-
-
the code base needs a review, usually
export MSS_CONFIG_PATH="/tmp/tmp78h01gas/.config/mss"
should be enough to set this path, but it is ignored.
# set "MSS_CONFIG_PATH" os.environ["MSS_CONFIG_PATH"] = os.path.join(tempfile.mkdtemp(), ".config", "mss")
-
- changed milestone to 1.10.0
-
reporter There is some code hidden away in
mslib/_tests/constants.py
that changes the environment for testing. That should prevent the user’s config from interfering with the tests. This seems to work on my laptop. Maybe you had a different error with the config?BTW, I do not think that the current solution is very robust. I think, this should be moved to conftest.py where it can be applied before importing any mslib code.
-
- changed milestone to 2.0.0
-
- changed milestone to 2.1.0
- Log in to comment
same situation for the mss-core.conf which has maybe incompatible qt cached values