当前位置: 首页>>代码示例>>Python>>正文


Python CALLBACK_REGISTRY.append_to方法代码示例

本文整理汇总了Python中lettuce.registry.CALLBACK_REGISTRY.append_to方法的典型用法代码示例。如果您正苦于以下问题:Python CALLBACK_REGISTRY.append_to方法的具体用法?Python CALLBACK_REGISTRY.append_to怎么用?Python CALLBACK_REGISTRY.append_to使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lettuce.registry.CALLBACK_REGISTRY的用法示例。


在下文中一共展示了CALLBACK_REGISTRY.append_to方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: inner

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
        def inner(self, callback, name=None):
            if not callable(callback):
                name = callback
                return lambda callback: inner(self, callback, name=name)

            CALLBACK_REGISTRY.append_to(
                where,
                when.format(name=self.name),
                function=callback,
                name=name,
            )

            return callback
开发者ID:raitisdembovskis,项目名称:lettuce,代码行数:15,代码来源:terrain.py

示例2: each_feature

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def each_feature(cls, function):
     CALLBACK_REGISTRY.append_to('feature', "%s_each" % cls.__name__, function)
     return function
开发者ID:elesbom,项目名称:lettuce,代码行数:5,代码来源:terrain.py

示例3: outline

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def outline(cls, function):
     CALLBACK_REGISTRY.append_to('scenario', "outline", function)
     return function
开发者ID:elesbom,项目名称:lettuce,代码行数:5,代码来源:terrain.py

示例4: each_scenario

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def each_scenario(cls, function):
     CALLBACK_REGISTRY.append_to('scenario', "%s_each" % cls.__name__, function)
     return function
开发者ID:elesbom,项目名称:lettuce,代码行数:5,代码来源:terrain.py

示例5: each_step

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def each_step(cls, function):
     CALLBACK_REGISTRY.append_to('step', "%s_each" % cls.__name__, function)
     return function
开发者ID:elesbom,项目名称:lettuce,代码行数:5,代码来源:terrain.py

示例6: all

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def all(cls, function):
     CALLBACK_REGISTRY.append_to('all', cls.__name__, function)
     return function
开发者ID:elesbom,项目名称:lettuce,代码行数:5,代码来源:terrain.py

示例7: method

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def method(self, fn):
     CALLBACK_REGISTRY.append_to(where, when % {'0': self.name}, fn)
     return fn
开发者ID:UjeenM,项目名称:lettuce,代码行数:5,代码来源:terrain.py

示例8: handle_request

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def handle_request(cls, function):
     CALLBACK_REGISTRY.append_to('handle_request', cls.__name__, function)
     return function
开发者ID:DominikGuzei,项目名称:lettuce,代码行数:5,代码来源:terrain.py

示例9: runserver

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def runserver(cls, function):
     CALLBACK_REGISTRY.append_to('runserver', cls.__name__, function)
     return function
开发者ID:DominikGuzei,项目名称:lettuce,代码行数:5,代码来源:terrain.py

示例10: method

# 需要导入模块: from lettuce.registry import CALLBACK_REGISTRY [as 别名]
# 或者: from lettuce.registry.CALLBACK_REGISTRY import append_to [as 别名]
 def method(self, fn):
     CALLBACK_REGISTRY.append_to(where, when.format(self.name), fn)
     return fn
开发者ID:jeamland,项目名称:lettuce,代码行数:5,代码来源:terrain.py


注:本文中的lettuce.registry.CALLBACK_REGISTRY.append_to方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。