diff --git a/Tests/designspaceLib/designspace_test.py b/Tests/designspaceLib/designspace_test.py index 15be5631e..5ee09b27d 100644 --- a/Tests/designspaceLib/designspace_test.py +++ b/Tests/designspaceLib/designspace_test.py @@ -800,101 +800,3 @@ def __removeAxesFromDesignSpace(path): f.write(n) f.close() - -# @pytest.fixture -# def invalid_designspace(): -# p = "testCheck.designspace" -# __removeAxesFromDesignSpace(p) -# yield p - - -# #@pytest.mark.xfail(reason="The check method requires MutatorMath") -# def test_check(invalid_designspace, tmpdir): -# tmpdir = str(tmpdir) -# # check if the checks are checking -# testDocPath = os.path.join(tmpdir, invalid_designspace) -# masterPath1 = os.path.join(tmpdir, "masters", "masterTest1.ufo") -# masterPath2 = os.path.join(tmpdir, "masters", "masterTest2.ufo") -# instancePath1 = os.path.join(tmpdir, "instances", "instanceTest1.ufo") -# instancePath2 = os.path.join(tmpdir, "instances", "instanceTest2.ufo") - -# # no default selected -# doc = DesignSpaceDocument() -# # add master 1 -# s1 = SourceDescriptor() -# s1.path = masterPath1 -# s1.name = "master.ufo1" -# s1.location = dict(snap=0, pop=10) -# s1.familyName = "MasterFamilyName" -# s1.styleName = "MasterStyleNameOne" -# doc.addSource(s1) -# # add master 2 -# s2 = SourceDescriptor() -# s2.path = masterPath2 -# s2.name = "master.ufo2" -# s2.location = dict(snap=1000, pop=20) -# s2.familyName = "MasterFamilyName" -# s2.styleName = "MasterStyleNameTwo" -# doc.addSource(s2) -# doc.checkAxes() -# doc.getAxisOrder() == ['snap', 'pop'] -# assert doc.default == None -# doc.checkDefault() -# assert doc.default.name == 'master.ufo1' - -# # default selected -# doc = DesignSpaceDocument() -# # add master 1 -# s1 = SourceDescriptor() -# s1.path = masterPath1 -# s1.name = "master.ufo1" -# s1.location = dict(snap=0, pop=10) -# s1.familyName = "MasterFamilyName" -# s1.styleName = "MasterStyleNameOne" -# doc.addSource(s1) -# # add master 2 -# s2 = SourceDescriptor() -# s2.path = masterPath2 -# s2.name = "master.ufo2" -# s2.copyInfo = True -# s2.location = dict(snap=1000, pop=20) -# s2.familyName = "MasterFamilyName" -# s2.styleName = "MasterStyleNameTwo" -# doc.addSource(s2) -# doc.checkAxes() -# assert doc.getAxisOrder() == ['snap', 'pop'] -# assert doc.default == None -# doc.checkDefault() -# assert doc.default.name == 'master.ufo2' - -# # generate a doc without axes, save and read again -# doc = DesignSpaceDocument() -# # add master 1 -# s1 = SourceDescriptor() -# s1.path = masterPath1 -# s1.name = "master.ufo1" -# s1.location = dict(snap=0, pop=10) -# s1.familyName = "MasterFamilyName" -# s1.styleName = "MasterStyleNameOne" -# doc.addSource(s1) -# # add master 2 -# s2 = SourceDescriptor() -# s2.path = masterPath2 -# s2.name = "master.ufo2" -# s2.location = dict(snap=1000, pop=20) -# s2.familyName = "MasterFamilyName" -# s2.styleName = "MasterStyleNameTwo" -# doc.addSource(s2) -# doc.checkAxes() -# doc.write(testDocPath) -# __removeAxesFromDesignSpace(testDocPath) - -# new = DesignSpaceDocument() -# new.read(testDocPath) -# assert len(new.axes) == 2 -# new.checkAxes() -# assert len(new.axes) == 2 -# assert print([a.name for a in new.axes]) == ['snap', 'pop'] -# new.write(testDocPath) - -