diff options
author | Jaime van Kessel <nallath@gmail.com> | 2020-10-09 14:58:26 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2020-10-09 14:58:26 +0300 |
commit | bfef61ad81b6702b6cdde3755da7733b51670f6c (patch) | |
tree | 254451028955da8855f1b150a71fa071ab9c7ec4 /tests/Settings | |
parent | f31490125c56c7e1dfc2bb782a8af0167957dc1c (diff) |
Use fastConfigParser for the versionUpToDate test
This makes the test a fair bit faster!
Diffstat (limited to 'tests/Settings')
-rw-r--r-- | tests/Settings/TestProfiles.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/Settings/TestProfiles.py b/tests/Settings/TestProfiles.py index 7a9c3fed93..262b886640 100644 --- a/tests/Settings/TestProfiles.py +++ b/tests/Settings/TestProfiles.py @@ -7,6 +7,7 @@ import os import os.path import pytest +from UM.FastConfigParser import FastConfigParser from cura.CuraApplication import CuraApplication # To compare against the current SettingVersion. from UM.Settings.DefinitionContainer import DefinitionContainer from UM.Settings.InstanceContainer import InstanceContainer @@ -47,6 +48,7 @@ def collectAllVariants(): result.append(os.path.join(root, filename)) return result + def collectAllIntents(): result = [] for root, directories, filenames in os.walk(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "resources", "intent"))): @@ -169,8 +171,7 @@ def test_validateVariantProfiles(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) + parser = FastConfigParser(data.read()) assert "general" in parser assert "version" in parser["general"] |