mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Add test to ensure that UM3 and UM3E variants are kept the same
It's a bit chunky, but functional.
This commit is contained in:
parent
9837537120
commit
c7c54f6d3a
1 changed files with 25 additions and 0 deletions
25
tests/TestProfileRequirements.py
Normal file
25
tests/TestProfileRequirements.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
import configparser #To read the profiles.
|
||||
import os #To join paths.
|
||||
import pytest
|
||||
|
||||
## Makes sure that the variants for the Ultimaker 3 Extended are exactly the
|
||||
# same as for the Ultimaker 3.
|
||||
#
|
||||
# Once we have specialised profiles or a mechanism to inherit variants too, we
|
||||
# may remove this test and have different profiles for the extended where
|
||||
# needed, but until then we should keep them the same. It's happened all too
|
||||
# often that we updated the variants for the UM3 but forgot about the UM3E.
|
||||
@pytest.mark.parametrize("um3_file, um3e_file", [
|
||||
#List the corresponding files below.
|
||||
("ultimaker3_aa0.8.inst.cfg", "ultimaker3_extended_aa0.8.inst.cfg"),
|
||||
("ultimaker3_aa04.inst.cfg", "ultimaker3_extended_aa04.inst.cfg"),
|
||||
("ultimaker3_bb0.8.inst.cfg", "ultimaker3_extended_bb0.8.inst.cfg"),
|
||||
("ultimaker3_bb04.inst.cfg", "ultimaker3_extended_bb04.inst.cfg")
|
||||
])
|
||||
def test_ultimaker3extended_variants(um3_file, um3e_file):
|
||||
directory = os.path.join(os.path.dirname(__file__), "..", "resources", "variants") #TODO: Hardcoded path relative to this test file.
|
||||
um3 = configparser.ConfigParser()
|
||||
um3.read_file(open(os.path.join(directory, um3_file)))
|
||||
um3e = configparser.ConfigParser()
|
||||
um3e.read_file(open(os.path.join(directory, um3e_file)))
|
||||
assert um3["values"] == um3e["values"]
|
Loading…
Add table
Add a link
Reference in a new issue