mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Use fastConfigParser for the versionUpToDate test
This makes the test a fair bit faster!
This commit is contained in:
parent
f31490125c
commit
bfef61ad81
1 changed files with 3 additions and 2 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue