Commit 38ebee6a authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

TEST: test idle.block

parent 69297c6f
......@@ -157,6 +157,29 @@ def _test_idleTimeout():
assert idle.getIdleTimeout() == default
@pytest.mark.wxtest
def test_block_with_gui(): _run_with_wx( _test_block)
def test_block_without_gui(): _run_without_wx(_test_block)
def _test_block():
called = [False]
if fslplatform.haveGui:
import wx
def idlefunc():
called[0] = True
wx.CallLater(1000, idlefunc)
start = time.time()
idle.block(2)
end = time.time()
assert (end - start) >= 2
if fslplatform.haveGui:
assert called[0]
@pytest.mark.wxtest
def test_idle():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment