From bfef61ad81b6702b6cdde3755da7733b51670f6c Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 9 Oct 2020 13:58:26 +0200 Subject: [PATCH] Use fastConfigParser for the versionUpToDate test This makes the test a fair bit faster! --- tests/Settings/TestProfiles.py | 5 +++-- 1 file 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"]