diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-05-08 13:18:48 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-05-08 13:18:48 +0300 |
commit | 17af83bc19ca7f4d32a2b7a7f7baebd9e4177f8e (patch) | |
tree | e56160c90abff6494e9849b55e24fd4d9d42d32d /tests/Settings | |
parent | 6baca9eaa2e672ef00c65d642c60c54d75d1acc6 (diff) |
Also test for the normal Version number
It rarely changes so it's less of a problem, but you never know.
Diffstat (limited to 'tests/Settings')
-rw-r--r-- | tests/Settings/TestProfiles.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/Settings/TestProfiles.py b/tests/Settings/TestProfiles.py index e654fa963b..cf26ad7020 100644 --- a/tests/Settings/TestProfiles.py +++ b/tests/Settings/TestProfiles.py @@ -3,17 +3,14 @@ from unittest.mock import MagicMock import configparser # To read the profiles. +import os +import os.path import pytest from cura.CuraApplication import CuraApplication # To compare against the current SettingVersion. from UM.Settings.DefinitionContainer import DefinitionContainer from UM.Settings.InstanceContainer import InstanceContainer - -import os -import os.path - from UM.VersionUpgradeManager import VersionUpgradeManager -from cura.CuraApplication import CuraApplication def collectAllQualities(): @@ -145,12 +142,16 @@ def test_validateVariantProfiles(file_name): assert False @pytest.mark.parametrize("file_name", quality_filepaths + variant_filepaths + intent_filepaths) -def test_settingVersionUpToDate(file_name): +def test_versionUpToDate(file_name): try: with open(file_name, encoding = "utf-8") as data: parser = configparser.ConfigParser(interpolation = None) parser.read(file_name) + assert "general" in parser + assert "version" in parser["general"] + assert int(parser["general"]["version"]) == InstanceContainer.Version + assert "metadata" in parser assert "setting_version" in parser["metadata"] assert int(parser["metadata"]["setting_version"]) == CuraApplication.SettingVersion |