本文整理汇总了Python中pykt.KyotoTycoon.increment_double方法的典型用法代码示例。如果您正苦于以下问题:Python KyotoTycoon.increment_double方法的具体用法?Python KyotoTycoon.increment_double怎么用?Python KyotoTycoon.increment_double使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pykt.KyotoTycoon
的用法示例。
在下文中一共展示了KyotoTycoon.increment_double方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_increment_double_arg
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import increment_double [as 别名]
def test_increment_double_arg():
db = KyotoTycoon()
db = db.open()
ret = db.increment_double("ID")
ok_(ret == 1.0)
ret = db.increment_double("ID", 100.1)
ok_(ret == 101.1)
示例2: test_increment_double
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import increment_double [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()
示例3: test_increment_expire
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import increment_double [as 别名]
def test_increment_expire():
db = KyotoTycoon()
db = db.open()
ret = db.increment_double("A", expire=2)
ok_(ret)
time.sleep(3)
ret = db.get("A")
ok_(ret == None)
db.close()
示例4: test_increment_double_utf8
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import increment_double [as 别名]
def test_increment_double_utf8():
db = KyotoTycoon()
db = db.open()
ret = db.increment_double("インクリメントd")
ok_(ret == 1.0)
db.close()
示例5: test_increment_double_with_db
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import increment_double [as 别名]
def test_increment_double_with_db():
db = KyotoTycoon("test")
db = db.open()
db.increment_double("ID")
ok_(False)
示例6: test_err_increment_double
# 需要导入模块: from pykt import KyotoTycoon [as 别名]
# 或者: from pykt.KyotoTycoon import increment_double [as 别名]
def test_err_increment_double():
db = KyotoTycoon()
ret = db.increment_double("ID")