Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
python-spectrometer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qutech
python-spectrometer
Commits
187fa041
Verified
Commit
187fa041
authored
2 months ago
by
Tobias Hangleiter
Browse files
Options
Downloads
Patches
Plain Diff
Give in_process time to stop
parent
32374b03
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!65
Fix flaky live view tests on CI
Pipeline
#1641497
waiting for manual action
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_live_view.py
+6
-2
6 additions, 2 deletions
tests/test_live_view.py
with
6 additions
and
2 deletions
tests/test_live_view.py
+
6
−
2
View file @
187fa041
...
...
@@ -50,10 +50,13 @@ def advance_until_stopped(*views):
def
stop_view
(
*
views
,
in_process
):
if
len
(
views
)
!=
1
and
not
in_process
and
not
is_using_mpl_gui_backend
(
views
[
0
].
fig
)
:
if
len
(
views
)
!=
1
:
# need to hack a bit to get the linked views to stop
views
[
0
].
stop_event
.
set
()
advance_until_stopped
(
*
views
)
if
not
in_process
and
not
is_using_mpl_gui_backend
(
views
[
0
].
fig
):
advance_until_stopped
(
*
views
)
else
:
time
.
sleep
(
100e-3
)
try
:
views
[
0
].
stop
()
...
...
@@ -65,6 +68,7 @@ def stop_view(*views, in_process):
def
close_view
(
*
views
,
in_process
=
False
):
if
in_process
:
views
[
0
].
close_event
.
set
()
time
.
sleep
(
100e-3
)
return
stop_view
(
*
views
,
in_process
=
in_process
)
...
...
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