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


Python KyotoTycoon.close方法代码示例

本文整理汇总了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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:9,代码来源:test_get.py

示例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()
开发者ID:mopemope,项目名称:pykt,代码行数:9,代码来源:test_echo.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:9,代码来源:test_get.py

示例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()
开发者ID:mopemope,项目名称:pykt,代码行数:9,代码来源:test_head.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:9,代码来源:test_status.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:9,代码来源:test_status.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:9,代码来源:test_report.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:9,代码来源:test_get.py

示例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()
开发者ID:mopemope,项目名称:pykt,代码行数:9,代码来源:test_head.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:10,代码来源:test_increment.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:10,代码来源:test_append.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:10,代码来源:test_increment_double.py

示例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()
开发者ID:beschulz,项目名称:kyototycoon,代码行数:10,代码来源:test_append.py

示例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)
开发者ID:beschulz,项目名称:kyototycoon,代码行数:10,代码来源:test_status.py

示例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()
开发者ID:mopemope,项目名称:pykt,代码行数:10,代码来源:test_match_regex.py


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