diff options
author | Jaime van Kessel <nallath@gmail.com> | 2019-09-10 11:46:23 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2019-09-10 11:57:25 +0300 |
commit | e9862fb348219b536c50bf9b7e27d8ad8c1397ec (patch) | |
tree | 91a5a906c5eb1e2bd712f1a18bfd096bfa053b80 /plugins/VersionUpgrade/VersionUpgrade41to42 | |
parent | f8472d6414fb44164cdb9458df9e838d694fecfa (diff) |
Move version upgrade for intents from 4.1-4.2 to 4.3-4.4
CURA-6599
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade41to42')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py | 14 | ||||
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade41to42/tests/TestVersionUpgrade41To42.py | 36 |
2 files changed, 1 insertions, 49 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py b/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py index a5d7436fde..a5a77a91e0 100644 --- a/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py +++ b/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py @@ -308,18 +308,6 @@ class VersionUpgrade41to42(VersionUpgrade): # Update version number. parser["metadata"]["setting_version"] = "8" - parser["general"]["version"] = "5" - - # We should only have 6 levels when we start. - assert "7" not in parser["containers"] - - # We added the intent container in Cura 4.2. This means that all other containers move one step down. - parser["containers"]["7"] = parser["containers"]["6"] - parser["containers"]["6"] = parser["containers"]["5"] - parser["containers"]["5"] = parser["containers"]["4"] - parser["containers"]["4"] = parser["containers"]["3"] - parser["containers"]["3"] = parser["containers"]["2"] - parser["containers"]["2"] = "empty_intent" # Change renamed profiles. if "containers" in parser: @@ -347,4 +335,4 @@ class VersionUpgrade41to42(VersionUpgrade): result = io.StringIO() parser.write(result) - return [filename], [result.getvalue()]
\ No newline at end of file + return [filename], [result.getvalue()] diff --git a/plugins/VersionUpgrade/VersionUpgrade41to42/tests/TestVersionUpgrade41To42.py b/plugins/VersionUpgrade/VersionUpgrade41to42/tests/TestVersionUpgrade41To42.py deleted file mode 100644 index bd7f231b05..0000000000 --- a/plugins/VersionUpgrade/VersionUpgrade41to42/tests/TestVersionUpgrade41To42.py +++ /dev/null @@ -1,36 +0,0 @@ -import configparser - -import VersionUpgrade41to42 - -before_update = """[general] -version = 4 -name = Ultimaker 3 -id = Ultimaker 3 - -[metadata] -type = machine - -[containers] -0 = user_profile -1 = quality_changes -2 = quality -3 = material -4 = variant -5 = definition_changes -6 = definition -""" - - -def test_upgrade(): - upgrader = VersionUpgrade41to42.VersionUpgrade41to42() - file_name, new_data = upgrader.upgradeStack(before_update, "whatever") - parser = configparser.ConfigParser(interpolation=None) - parser.read_string(new_data[0]) - assert parser["containers"]["0"] == "user_profile" - assert parser["containers"]["1"] == "quality_changes" - assert parser["containers"]["2"] == "empty_intent" - assert parser["containers"]["3"] == "quality" - assert parser["containers"]["4"] == "material" - assert parser["containers"]["5"] == "variant" - assert parser["containers"]["6"] == "definition_changes" - assert parser["containers"]["7"] == "definition"
\ No newline at end of file |