Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/a/r/archgenxml-2.6/src/archgenxml/ArchGenXML.py   archgenxml(Download)
    except ImportError:
        # if installed in site-packages:
        from archgenxml.ArchetypesGenerator import ArchetypesGenerator
    # Instead of passing these options to the generator (which uses it
    # to update it's self.__dict__, we ought to pass this along to a
    optionsHolder = component.getUtility(IOptions, name='options')
    optionsHolder.storeOptions(options)
    gen = ArchetypesGenerator(model, **options)
    gen.parseAndGenerate()
    log.info('generator run took %1.2f sec.' % (time()-starttime))

src/a/r/archgenxml-2.6/src/archgenxml/tests/testArcheTypesGenerator.py   archgenxml(Download)
import time
 
from archgenxml.ArchetypesGenerator import ArchetypesGenerator
from archgenxml.ArchetypesGenerator import DummyModel
from archgenxml.interfaces import IOptions
                                                    self.options['email'])
 
        generator = ArchetypesGenerator('/dev/null', **self.options)
        headerinfo = generator.getHeaderInfo(self.model)
 
        expected = 'Copyright (c) %s by Example1 <one@example.org>, ' \
                   'Example2 <two@example.org>' % (year)
        generator = ArchetypesGenerator('/dev/null', **self.options)
        headerinfo = generator.getHeaderInfo(self.model)
 
        expected = 'Copyright (c) %s by Äöü€ <%s>' % (year,
                                                      self.options['email'])
        generator = ArchetypesGenerator('/dev/null', **self.options)
        headerinfo = generator.getHeaderInfo(self.model)
        self.failUnless(headerinfo['copyright'] == expected)
 
    def test_generateModuleInfoHeader(self):
        self.options.update(author='Äöü€')
        generator = ArchetypesGenerator('/dev/null', **self.options)