Exemplo n.º 1
0
 def test_new_mark():
     """
     Test kwarg
     """
     configuration = '\n'.join([
         'FLAGS:',
         '  short: No',
         '  pad: Yes',
         '',
         'TEST:',
         '  pref: TEST',
         '  pref_s: t',
         '  pref_color: y',
         '  pref_bgcol: blue',
         '  pref_gloss: 1',
         '  text_color: k',
         '  text_bgcol: 7',
         '  text_gloss: d',
         '',
     ])
     with tempfile.NamedTemporaryFile('wt', delete=False) as config:
         config.write(configuration)
     DEFAULT_PRINT.set_opts()
     DEFAULT_PRINT.set_opts(Path(config.name))
     DEFAULT_PRINT.psprint("Test Text", mark='TEST')
     DEFAULT_PRINT.psprint("Info Test", mark='info')
     config.close()
     DEFAULT_PRINT.remove_style(mark='TEST')
Exemplo n.º 2
0
 def test_bad_rm_mark(self):
     '''
     test mark removal error
     '''
     self.assertRaises(SyntaxError, lambda: DEFAULT_PRINT.remove_style())
Exemplo n.º 3
0
 def test_pop_style():
     '''
     test edit style
     '''
     DEFAULT_PRINT.remove_style(index_int=4)