示例#1
0
文件: base.py 项目: Byron/bcore
    def start_nose(cls):
        """Start nose with the arguments previously specified on the commandline
        @return true if all tests succeeded, false on failure"""
        kvstore = ControlledProcessInformation().as_kvstore()
        value = kvstore.value_by_schema(cls.nose_schema)

        import nose
        return nose.main(argv=['nosetests'] + value.args)
示例#2
0
文件: base.py 项目: Byron/bcore
 def new(cls, *args, **kwargs):
     """All parameters as in ProcessAwareApplication, but requires a package_name kwargs to 
     provide an entry point in case we were launched without wrapper"""
     package_name = kwargs.pop('package_name')
     if not package_name:
         raise ValueError("A package_name must be set to allow plugin loading if no wrapper is involved")
     # end assure package_name is set
     inst = super(PluginLoadingProcessAwareApplication, cls).new(*args, **kwargs)
     if not ControlledProcessInformation.has_data():
         PythonPackageIterator().import_modules(store=inst.context().settings(), package_name=package_name)
     # end
     return inst