Exemplo n.º 1
0
def processor_order(string):
    proc_tuple = string_to_stringtuple(string)
    proc_names = get_entry_points('ulif.openoffice.processors').keys()
    for name in proc_tuple:
        if name not in proc_names:
            raise ValueError('Only values in %r are allowed.' % proc_names)
    return proc_tuple
Exemplo n.º 2
0
def processor_order(string):
    proc_tuple = string_to_stringtuple(string)
    proc_names = get_entry_points('ulif.openoffice.processors').keys()
    for name in proc_tuple:
        if name not in proc_names:
            raise ValueError('Only values in %r are allowed.' % proc_names)
    return proc_tuple
Exemplo n.º 3
0
    def avail_procs(self):
        """A dict of registered processors.

        Keys are the processor names (normally equal to their
        respective prefix). Values are the classes implementing the
        respective processor.
        """
        return get_entry_points('ulif.openoffice.processors')
Exemplo n.º 4
0
 def test_get_entry_points(self):
     result = get_entry_points('ulif.openoffice.processors')
     assert result['oocp'] is OOConvProcessor
Exemplo n.º 5
0
 def avail_procs(self):
     return get_entry_points('ulif.openoffice.processors')
Exemplo n.º 6
0
 def avail_procs(self):
     return get_entry_points('ulif.openoffice.processors')
Exemplo n.º 7
0
 def test_registered(self):
     # make sure the processor is registered on startup
     assert 'psj_html' in get_entry_points('ulif.openoffice.processors')
Exemplo n.º 8
0
 def test_get_entry_points(self):
     # get_entry_points really delivers our processors (maybe more)
     result = get_entry_points('ulif.openoffice.processors')
     assert result['oocp'] is OOConvProcessor