def test_set_an_incorrect_font(self): font = 123 styleobj = Style() with self.assertRaises(TypeError): styleobj.font = font self.assertEqual(font, styleobj.font)
def test_set_a_correct_font(self): font = "calibri.ttf" styleobj = Style() styleobj.font = font self.assertEqual(font, styleobj.font)