示例#1
0
 def test_get_style_args_all_accessible(self):
     styles = ['lines', 'dash', 'spaces', 'arrow', 'plus', 'emoji']
     for s in styles:
         d = sd.get_styleargs(s)
         self.assertTrue(isinstance(d, dict))
     with self.assertRaises(sd.SeedirError):
         d = sd.get_styleargs('missing_style')
示例#2
0
 def test_format_indent(self):
     d = sd.get_styleargs('lines')
     f1 = sd.format_indent(d, indent=4)
     f2 = sd.format_indent(d, indent=1)
     chars = ['extend', 'space', 'split', 'final']
     self.assertTrue(all(len(f1[c]) == 4 for c in chars))
     self.assertTrue(all(len(f2[c]) == 1 for c in chars))
示例#3
0
 def test_get_style_args_deepcopy(self):
     x = sd.STYLE_DICT['lines']
     y = sd.get_styleargs('lines')
     self.assertTrue(x is not y)