Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
1cdac302
Commit
1cdac302
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Test new idle.block option
parent
54879a1f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_idle.py
+19
-0
19 additions, 0 deletions
tests/test_idle.py
with
19 additions
and
0 deletions
tests/test_idle.py
+
19
−
0
View file @
1cdac302
...
...
@@ -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
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment