Skip to content
Snippets Groups Projects
Commit 1cdac302 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

TEST: Test new idle.block option

parent 54879a1f
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,25 @@ def _test_block():
assert called[0]
@pytest.mark.wxtest
def test_block_until_with_gui(): _run_with_wx( _test_block_until)
def test_block_until_without_gui(): _run_without_wx(_test_block_until)
def _test_block_until():
ev = threading.Event()
def task():
time.sleep(1)
ev.set()
threading.Thread(target=task).start()
start = time.time()
idle.block(3, until=ev.is_set)
end = time.time()
assert end - start < 3
@pytest.mark.wxtest
def test_idle():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment