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


Python Queryable.close方法代码示例

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


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

示例1: test_select_many_with_index_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_select_many_with_index_closed(self):
     a = [{'name' : 'Alice', 'flowers' : ['Agapanthus', 'Allium', 'Alpina', 'Alstroemeria', 'Amaranthus', 'Amarylis' ] },
          {'name' : 'Bob',   'flowers' : ['Bouvardia' ]},
          {'name' : 'Chris', 'flowers' : ['Carnations', 'Cattleya', 'Celosia', 'Chincherinchee', 'Chrysanthemum']}]
     b = Queryable(a)
     b.close()
     self.assertRaises(ValueError, lambda: b.select_many_with_index(lambda i, x: [str(i) + flower for flower in x['flowers']]))
开发者ID:Dror-LightCyber,项目名称:asq,代码行数:9,代码来源:test_select_many_with_index.py

示例2: test_log_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_log_closed(self):
     a = [1, 6, 4, 3, 9, 2]
     b = Queryable(a)
     b.close()
     self.assertRaises(ValueError, lambda: b.log())
开发者ID:pombredanne,项目名称:asq,代码行数:7,代码来源:test_log.py

示例3: test_aggregate_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_aggregate_closed(self):
     b = Queryable([])
     b.close()
     self.assertRaises(ValueError, lambda: b.aggregate(operator.add, 72))
开发者ID:Dror-LightCyber,项目名称:asq,代码行数:6,代码来源:test_aggregate.py

示例4: test_contains_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_contains_closed(self):
     b = Queryable([1])
     b.close()
     self.assertRaises(ValueError, lambda: b.contains(5))
开发者ID:pombredanne,项目名称:asq,代码行数:6,代码来源:test_contains.py

示例5: test_skip_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_skip_closed(self):
     a = ['a', 'b', 'c']
     b = Queryable(a)
     b.close()
     self.assertRaises(ValueError, lambda: b.skip(1))
开发者ID:GitHubTianPeng,项目名称:101worker,代码行数:7,代码来源:test_skip.py

示例6: test_group_join_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_group_join_closed(self):
     a = [1, 2]
     b = [2, 3]
     c = Queryable(a)
     c.close()
     self.assertRaises(ValueError, lambda: c.group_join(b))
开发者ID:Dror-LightCyber,项目名称:asq,代码行数:8,代码来源:test_group_join.py

示例7: test_select_many_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_select_many_closed(self):
     b = Queryable([1, 2, 4, 8])
     b.close()
     self.assertRaises(ValueError, lambda: b.select_many(lambda x: x * 2))
开发者ID:Dror-LightCyber,项目名称:asq,代码行数:6,代码来源:test_select_many.py

示例8: test_select_with_index_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_select_with_index_closed(self):
     a = [27, 74, 18, 48, 57, 97, 76, 20, 91, 8, 80, 59, 20, 32, 58, 12, 74, 78, 4]
     b = Queryable(a)
     b.close()
     self.assertRaises(ValueError, lambda: b.select_with_index(lambda x, y: x*y))
开发者ID:pombredanne,项目名称:asq,代码行数:7,代码来源:test_select_with_index.py

示例9: test_pre_scan_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_pre_scan_closed(self):
     b = Queryable([])
     b.close()
     self.assertRaises(ValueError, lambda: b.pre_scan())
开发者ID:pombredanne,项目名称:asq,代码行数:6,代码来源:test_pre_scan.py

示例10: test_union_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_union_closed(self):
     b = Queryable([1])
     b.close()
     self.assertRaises(ValueError, lambda: b.union([1, 2, 3]))
开发者ID:pombredanne,项目名称:asq,代码行数:6,代码来源:test_union.py

示例11: test_skip_while_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_skip_while_closed(self):
     a = [1, 2, 3, 4]
     b = Queryable(a)
     b.close()
     self.assertRaises(ValueError, lambda: b.skip_while(lambda x : x < 2))
开发者ID:GitHubTianPeng,项目名称:101worker,代码行数:7,代码来源:test_skip_while.py

示例12: test_where_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_where_closed(self):
     a = range(0, 100)
     b = Queryable(a)
     b.close()
     self.assertRaises(ValueError, lambda: b.where(lambda x: x % 3 == 0))
开发者ID:Dror-LightCyber,项目名称:asq,代码行数:7,代码来源:test_where.py

示例13: test_to_set_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_to_set_closed(self):
     a = [1, 2, 4, 8, 16, 32]
     b = Queryable(a)
     b.close()
     self.assertRaises(ValueError, lambda: b.to_set())
开发者ID:pombredanne,项目名称:asq,代码行数:7,代码来源:test_to_set.py

示例14: test_difference_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_difference_closed(self):
     b = Queryable([1])
     b.close()
     self.assertRaises(ValueError, lambda: b.difference([2, 5]))
     
开发者ID:pombredanne,项目名称:asq,代码行数:6,代码来源:test_difference.py

示例15: test_intersect_closed

# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import close [as 别名]
 def test_intersect_closed(self):
     a = [1, 1, 2, 2, 4, 5, 3]
     b = [2, 5, 5]
     b = Queryable(a)
     b.close()
     self.assertRaises(ValueError, lambda: b.intersect(b))
开发者ID:pombredanne,项目名称:asq,代码行数:8,代码来源:test_intersect.py


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