MCPcopy Create free account
hub / github.com/Tencent/MMKV / test_bool

Function test_bool

Python/unit_test.py:11–24  ·  view source on GitHub ↗
(kv)

Source from the content-addressed store, hash-verified

9
10
11def test_bool(kv):
12 ret = kv.set(True, 'bool')
13 assert ret
14
15 value = kv.getBool('bool')
16 assert value
17
18 value = kv.getBool(KeyNotExist)
19 assert not value
20
21 value = kv.getBool(KeyNotExist, True)
22 assert value
23
24 print('test bool: passed')
25
26
27def test_int(kv):

Callers 1

unit_test.pyFile · 0.85

Calls 2

setMethod · 0.45
getBoolMethod · 0.45

Tested by

no test coverage detected