示例#1
0
 def test_guidelineIndex(self):
     font = Font(getTestFontPath())
     guideline1 = Guideline(guidelineDict={"x": 100})
     guideline2 = Guideline(guidelineDict={"y": 200})
     font.guidelines = [guideline1, guideline2]
     self.assertEqual(font.guidelineIndex(guideline1), 0)
     self.assertEqual(font.guidelineIndex(guideline2), 1)
示例#2
0
 def test_removeGuideline(self):
     font = Font(getTestFontPath())
     guideline1 = Guideline(guidelineDict={"x": 100})
     guideline2 = Guideline(guidelineDict={"y": 200})
     font.guidelines = [guideline1, guideline2]
     font.removeGuideline(guideline1)
     self.assertEqual(font.guidelines, [guideline2])
示例#3
0
 def test_guidelineIndex(self):
     font = Font(getTestFontPath())
     guideline1 = Guideline(guidelineDict={"x": 100})
     guideline2 = Guideline(guidelineDict={"y": 200})
     font.guidelines = [guideline1, guideline2]
     self.assertEqual(font.guidelineIndex(guideline1), 0)
     self.assertEqual(font.guidelineIndex(guideline2), 1)
示例#4
0
 def test_removeGuideline(self):
     font = Font(getTestFontPath())
     guideline1 = Guideline(guidelineDict={"x": 100})
     guideline2 = Guideline(guidelineDict={"y": 200})
     font.guidelines = [guideline1, guideline2]
     font.removeGuideline(guideline1)
     self.assertEqual(font.guidelines, [guideline2])
示例#5
0
 def test_clearGuidelines(self):
     font = Font(getTestFontPath())
     guideline1 = Guideline(guidelineDict={"x": 100})
     guideline2 = Guideline(guidelineDict={"y": 200})
     font.guidelines = [guideline1, guideline2]
     self.assertEqual(font.guidelines, [guideline1, guideline2])
     font.clearGuidelines()
     self.assertEqual(font.guidelines, [])
示例#6
0
 def test_clearGuidelines(self):
     font = Font(getTestFontPath())
     guideline1 = Guideline(guidelineDict={"x": 100})
     guideline2 = Guideline(guidelineDict={"y": 200})
     font.guidelines = [guideline1, guideline2]
     self.assertEqual(font.guidelines, [guideline1, guideline2])
     font.clearGuidelines()
     self.assertEqual(font.guidelines, [])