本文整理汇总了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']]))
示例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())
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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())
示例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]))
示例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))
示例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))
示例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())
示例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]))
示例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))