Example #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)
Example #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])
Example #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)
Example #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])
Example #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, [])
Example #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, [])