Exemple #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
Exemple #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
Exemple #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')
 def test_get_entry_points(self):
     result = get_entry_points('ulif.openoffice.processors')
     assert result['oocp'] is OOConvProcessor
Exemple #5
0
 def avail_procs(self):
     return get_entry_points('ulif.openoffice.processors')
Exemple #6
0
 def avail_procs(self):
     return get_entry_points('ulif.openoffice.processors')
Exemple #7
0
 def test_registered(self):
     # make sure the processor is registered on startup
     assert 'psj_html' in get_entry_points('ulif.openoffice.processors')
 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