本文整理汇总了Python中morepath.tween.TweenRegistry.sorted_tween_factories方法的典型用法代码示例。如果您正苦于以下问题:Python TweenRegistry.sorted_tween_factories方法的具体用法?Python TweenRegistry.sorted_tween_factories怎么用?Python TweenRegistry.sorted_tween_factories使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类morepath.tween.TweenRegistry
的用法示例。
在下文中一共展示了TweenRegistry.sorted_tween_factories方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_tween_sorting_dag_error2
# 需要导入模块: from morepath.tween import TweenRegistry [as 别名]
# 或者: from morepath.tween.TweenRegistry import sorted_tween_factories [as 别名]
def test_tween_sorting_dag_error2():
reg = TweenRegistry()
def a():
pass
reg.register_tween_factory(a, over=a, under=None)
with pytest.raises(TopologicalSortError):
reg.sorted_tween_factories()
示例2: test_tween_sorting_one_tween
# 需要导入模块: from morepath.tween import TweenRegistry [as 别名]
# 或者: from morepath.tween.TweenRegistry import sorted_tween_factories [as 别名]
def test_tween_sorting_one_tween():
reg = TweenRegistry()
def foo():
pass
reg.register_tween_factory(foo, over=None, under=None)
assert reg.sorted_tween_factories() == [foo]
示例3: test_tween_sorting_two_tweens_over_reverse_reg
# 需要导入模块: from morepath.tween import TweenRegistry [as 别名]
# 或者: from morepath.tween.TweenRegistry import sorted_tween_factories [as 别名]
def test_tween_sorting_two_tweens_over_reverse_reg():
reg = TweenRegistry()
def top():
pass
def bottom():
pass
reg.register_tween_factory(bottom, over=None, under=None)
reg.register_tween_factory(top, over=bottom, under=None)
assert reg.sorted_tween_factories() == [top, bottom]
示例4: test_tween_sorting_three
# 需要导入模块: from morepath.tween import TweenRegistry [as 别名]
# 或者: from morepath.tween.TweenRegistry import sorted_tween_factories [as 别名]
def test_tween_sorting_three():
reg = TweenRegistry()
def a():
pass
def b():
pass
def c():
pass
reg.register_tween_factory(a, over=None, under=None)
reg.register_tween_factory(b, over=None, under=a)
reg.register_tween_factory(c, over=a, under=None)
assert reg.sorted_tween_factories() == [c, a, b]
示例5: test_tween_sorting_no_tweens
# 需要导入模块: from morepath.tween import TweenRegistry [as 别名]
# 或者: from morepath.tween.TweenRegistry import sorted_tween_factories [as 别名]
def test_tween_sorting_no_tweens():
reg = TweenRegistry()
assert reg.sorted_tween_factories() == []