MCPcopy Create free account
hub / github.com/CopterExpress/clover / test_long_callback

Function test_long_callback

clover/test/basic.py:65–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 assert wait_print.result == 'test'
64
65def test_long_callback():
66 from clover import long_callback
67 from time import sleep
68
69 # very basic test for long_callback
70 @long_callback
71 def cb(i):
72 cb.counter += i
73 cb.counter = 0
74 cb(2)
75 sleep(0.1)
76 cb(3)
77 sleep(1)
78 assert cb.counter == 5

Callers

nothing calls this directly

Calls 1

cbFunction · 0.70

Tested by

no test coverage detected