本文整理汇总了Python中pykt.KyotoTycoon.close方法的典型用法代码示例。如果您正苦于以下问题:Python KyotoTycoon.close方法的具体用法?Python KyotoTycoon.close怎么用?Python KyotoTycoon.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pykt.KyotoTycoon
的用法示例。
在下文中一共展示了KyotoTycoon.close方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_mapping_protocol
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_get_mapping_protocol():
db = KyotoTycoon()
db = db.open()
db.set("A", "B")
ret = db["A"]
ok_(ret == "B")
db.close()
示例2: test_echo_loop
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_echo_loop():
db = KyotoTycoon()
db = db.open()
for i in xrange(100):
ret = db.echo()
ok_(ret == True)
db.close()
示例3: test_get
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_get():
db = KyotoTycoon()
db = db.open()
db.set("A", "B")
ret = db.get("A")
ok_(ret == "B")
db.close()
示例4: test_head
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_head():
db = KyotoTycoon()
db = db.open()
db.set("A", "B")
ret = db.head("A")
ok_(ret == True)
db.close()
示例5: test_status
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_status():
db = KyotoTycoon()
db = db.open()
ret = db.status()
ok_(ret)
ok_(isinstance(ret, dict))
db.close()
示例6: test_status_loop
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_status_loop():
db = KyotoTycoon()
db = db.open()
for i in xrange(100):
ret = db.status()
ok_(ret)
db.close()
示例7: test_report
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_report():
db = KyotoTycoon()
db = db.open()
ret = db.report()
ok_(ret)
ok_(isinstance(ret, dict))
db.close()
示例8: test_get_utf8
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_get_utf8():
db = KyotoTycoon()
db = db.open()
db.set("あいうえお", "かきくけこ")
ret = db.get("あいうえお")
ok_(ret == "かきくけこ")
db.close()
示例9: test_head_utf8
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_head_utf8():
db = KyotoTycoon()
db = db.open()
db.set("あいうえお", "かきくけこ")
ret = db.head("あいうえお")
ok_(ret == True)
db.close()
示例10: test_increment_arg
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_increment_arg():
db = KyotoTycoon()
db = db.open()
ret = db.increment("I")
ok_(ret == 1)
ret = db.increment("I", 100)
ok_(ret == 101)
db.close()
示例11: test_append_large
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_append_large():
db = KyotoTycoon()
db = db.open()
ret = db.append("L", "L" * 1024 * 1024 * 1)
ok_(ret)
ret = db.get("L")
ok_(ret == "L" * 1024 * 1024 * 1)
db.close()
示例12: test_increment_double
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_increment_double():
db = KyotoTycoon()
db = db.open()
ret = db.increment_double("ID")
ok_(ret == 1.0)
ret = db.increment_double("ID")
ok_(ret == 2.0)
db.close()
示例13: test_append
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_append():
db = KyotoTycoon()
db = db.open()
ret = db.append("A", "B")
ok_(ret)
ret = db.get("A")
ok_(ret == "B")
db.close()
示例14: test_status_with_db
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_status_with_db():
db = KyotoTycoon("test")
db = db.open()
ret = db.status()
ok_(ret)
ok_(isinstance(ret, dict))
db.close()
ok_(False)
示例15: test_notfound
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import close [as 别名]
def test_notfound():
db = KyotoTycoon()
db = db.open()
db.set("BC", "B")
db.set("C", "B")
ret = db.match_regex("A")
ok_(ret == [])
db.close()