Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christoph Arthofer
fslpy
Commits
34db3b00
Commit
34db3b00
authored
May 26, 2021
by
Paul McCarthy
🚵
Browse files
TEST: Try and avoid conflicts in parallel tests in docker
parent
3a7dadd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_platform.py
View file @
34db3b00
...
@@ -10,6 +10,7 @@ import os
...
@@ -10,6 +10,7 @@ import os
import
gc
import
gc
import
os.path
as
op
import
os.path
as
op
import
sys
import
sys
import
time
import
shutil
import
shutil
import
tempfile
import
tempfile
import
pytest
import
pytest
...
@@ -41,8 +42,22 @@ def test_haveGui():
...
@@ -41,8 +42,22 @@ def test_haveGui():
import
wx
import
wx
p
=
fslplatform
.
Platform
()
p
=
fslplatform
.
Platform
()
app
=
wx
.
App
()
# We can get weird conflicts w.r.t. access to
# the display when multiple tests are running
# simultaneously within docker on the same
# machine.
app
=
None
for
_
in
range
(
5
):
try
:
app
=
wx
.
App
()
break
except
Exception
:
time
.
sleep
(
1
)
if
app
is
None
:
assert
False
frame
=
wx
.
Frame
(
None
)
frame
=
wx
.
Frame
(
None
)
passed
=
[
False
]
passed
=
[
False
]
frame
.
Show
()
frame
.
Show
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment