Esempio n. 1
0
 def test_1_of_16(self):
     for prefix in ('libreoffice', 'msoffice'):
         target_file = os.path.join(
             here, prefix+'_font_gradient.pdf')
         rez = fontsize.main(target_file=target_file, min_page_ratio=16)
         compare(rez,
                 [])
Esempio n. 2
0
 def test_checker_helpers(self):
     compare(fontsize.main(msg_info='All'),
             [dict(id='C1002',
                   msg_name='font-to-small',
                   msg='Font is to small: Text should take up a minimum '
                       'of 1/6th(by default) the page.',
                   help='Font is to small: Text should take up a minimum '
                        'of 1/6th(by default) the page.',
                   page='')])
     compare(fontsize.main(msg_info=['C1002']),
             [dict(id='C1002',
                   msg_name='font-to-small',
                   msg='Font is to small: Text should take up a minimum '
                       'of 1/6th(by default) the page.',
                   help='Font is to small: Text should take up a minimum '
                        'of 1/6th(by default) the page.',
                   page='')])
     compare(fontsize.main(msg_info=['W8001']),
             [])
 def test_checker_helpers(self):
     compare(fontsize.main(msg_info='All'), [
         dict(id='C1002',
              msg_name='font-to-small',
              msg='Font is to small: Text should take up a minimum '
              'of 1/6th(by default) the page.',
              help='Font is to small: Text should take up a minimum '
              'of 1/6th(by default) the page.',
              page='')
     ])
     compare(fontsize.main(msg_info=['C1002']), [
         dict(id='C1002',
              msg_name='font-to-small',
              msg='Font is to small: Text should take up a minimum '
              'of 1/6th(by default) the page.',
              help='Font is to small: Text should take up a minimum '
              'of 1/6th(by default) the page.',
              page='')
     ])
     compare(fontsize.main(msg_info=['W8001']), [])
 def test_1_of_10(self):
     for prefix in ('libreoffice', 'msoffice'):
         target_file = os.path.join(here, prefix + '_font_gradient.pdf')
         rez = fontsize.main(target_file=target_file, min_page_ratio=10)
         compare(
             rez, [{
                 'help': 'Font is to small: Text should take up a '
                 'minimum of 1/6th(by default) the page.',
                 'id': 'C1002',
                 'msg': 'Font is to small: Text should take up a minimum'
                 ' of 1/10.0th the page.',
                 'msg_name': 'font-to-small',
                 'page': 'Slide 11'
             }, {
                 'help': 'Font is to small: Text should take up a '
                 'minimum of 1/6th(by default) the page.',
                 'id': 'C1002',
                 'msg': 'Font is to small: Text should take up a minimum'
                 ' of 1/10.0th the page.',
                 'msg_name': 'font-to-small',
                 'page': 'Slide 12'
             }, {
                 'help': 'Font is to small: Text should take up a '
                 'minimum of 1/6th(by default) the page.',
                 'id': 'C1002',
                 'msg': 'Font is to small: Text should take up a minimum'
                 ' of 1/10.0th the page.',
                 'msg_name': 'font-to-small',
                 'page': 'Slide 13'
             }, {
                 'help': 'Font is to small: Text should take up a '
                 'minimum of 1/6th(by default) the page.',
                 'id': 'C1002',
                 'msg': 'Font is to small: Text should take up a minimum'
                 ' of 1/10.0th the page.',
                 'msg_name': 'font-to-small',
                 'page': 'Slide 14'
             }, {
                 'help': 'Font is to small: Text should take up a '
                 'minimum of 1/6th(by default) the page.',
                 'id': 'C1002',
                 'msg': 'Font is to small: Text should take up a minimum'
                 ' of 1/10.0th the page.',
                 'msg_name': 'font-to-small',
                 'page': 'Slide 15'
             }, {
                 'help': 'Font is to small: Text should take up a '
                 'minimum of 1/6th(by default) the page.',
                 'id': 'C1002',
                 'msg': 'Font is to small: Text should take up a minimum'
                 ' of 1/10.0th the page.',
                 'msg_name': 'font-to-small',
                 'page': 'Slide 16'
             }])
Esempio n. 5
0
 def test_1_of_10(self):
     for prefix in ('libreoffice', 'msoffice'):
         target_file = os.path.join(
             here, prefix+'_font_gradient.pdf')
         rez = fontsize.main(target_file=target_file, min_page_ratio=10)
         compare(rez,
                 [{'help': 'Font is to small: Text should take up a '
                           'minimum of 1/6th(by default) the page.',
                   'id': 'C1002',
                   'msg': 'Font is to small: Text should take up a minimum'
                          ' of 1/10.0th the page.',
                   'msg_name': 'font-to-small',
                   'page': 'Slide 11'},
                  {'help': 'Font is to small: Text should take up a '
                           'minimum of 1/6th(by default) the page.',
                   'id': 'C1002',
                   'msg': 'Font is to small: Text should take up a minimum'
                          ' of 1/10.0th the page.',
                   'msg_name': 'font-to-small',
                   'page': 'Slide 12'},
                  {'help': 'Font is to small: Text should take up a '
                           'minimum of 1/6th(by default) the page.',
                   'id': 'C1002',
                   'msg': 'Font is to small: Text should take up a minimum'
                          ' of 1/10.0th the page.',
                   'msg_name': 'font-to-small',
                   'page': 'Slide 13'},
                  {'help': 'Font is to small: Text should take up a '
                           'minimum of 1/6th(by default) the page.',
                   'id': 'C1002',
                   'msg': 'Font is to small: Text should take up a minimum'
                          ' of 1/10.0th the page.',
                   'msg_name': 'font-to-small',
                   'page': 'Slide 14'},
                  {'help': 'Font is to small: Text should take up a '
                           'minimum of 1/6th(by default) the page.',
                   'id': 'C1002',
                   'msg': 'Font is to small: Text should take up a minimum'
                          ' of 1/10.0th the page.',
                   'msg_name': 'font-to-small',
                   'page': 'Slide 15'},
                  {'help': 'Font is to small: Text should take up a '
                           'minimum of 1/6th(by default) the page.',
                   'id': 'C1002',
                   'msg': 'Font is to small: Text should take up a minimum'
                          ' of 1/10.0th the page.',
                   'msg_name': 'font-to-small',
                   'page': 'Slide 16'}])
 def test_1_of_16(self):
     for prefix in ('libreoffice', 'msoffice'):
         target_file = os.path.join(here, prefix + '_font_gradient.pdf')
         rez = fontsize.main(target_file=target_file, min_page_ratio=16)
         compare(rez, [])