예제 #1
0
 def test_style_nonregular_width(self):
     self.assertEqual(build_style_name(width='Condensed', is_italic=False),
                      'Condensed')
     self.assertEqual(build_style_name(width='Condensed', is_italic=True),
                      'Condensed Italic')
     self.assertEqual(
         build_style_name(weight='Thin', width='Condensed',
                          is_italic=False), 'Condensed Thin')
     self.assertEqual(
         build_style_name(weight='Thin', width='Condensed', is_italic=True),
         'Condensed Thin Italic')
예제 #2
0
 def _build(self, data, italic):
     return build_style_name(data, 'width', 'weight', 'custom', italic)
예제 #3
0
 def _build(self, data, italic):
     return build_style_name(data, 'width', 'weight', 'custom', italic)
예제 #4
0
 def test_style_custom(self):
     self.assertEqual(build_style_name(custom='Text', is_italic=False),
                      'Text')
     self.assertEqual(build_style_name(weight='Text', is_italic=True),
                      'Text Italic')
예제 #5
0
 def test_style_nonregular_weight(self):
     self.assertEqual(build_style_name(weight='Thin', is_italic=False),
                      'Thin')
     self.assertEqual(build_style_name(weight='Thin', is_italic=True),
                      'Thin Italic')
예제 #6
0
 def test_style_regular_weight(self):
     self.assertEqual(build_style_name(is_italic=False), 'Regular')
     self.assertEqual(build_style_name(is_italic=True), 'Italic')