Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
conda
installer
Commits
8657310d
Commit
8657310d
authored
Aug 12, 2021
by
Paul McCarthy
🚵
Browse files
TEST: basic monitor_progress test
parent
8eeeb282
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_routines.py
View file @
8657310d
...
...
@@ -140,6 +140,30 @@ def test_Process_check_output():
inst
.
Process
.
check_output
(
op
.
join
(
cwd
,
'script'
))
def
test_Process_monitor_progress
():
with
inst
.
tempdir
()
as
cwd
:
script
=
tw
.
dedent
(
"""
#!/usr/bin/env bash
for ((i=0;i<10;i++)); do
echo $i
done
"""
).
strip
()
with
open
(
'script'
,
'wt'
)
as
f
:
f
.
write
(
script
)
os
.
chmod
(
'script'
,
0o755
)
script
=
op
.
join
(
cwd
,
'script'
)
Process
.
monitor_progress
(
script
)
Process
.
monitor_progress
([
script
])
Process
.
monitor_progress
([
script
,
script
])
Process
.
monitor_progress
(
script
,
10
)
Process
.
monitor_progress
([
script
],
10
)
Process
.
monitor_progress
([
script
,
script
],
10
)
def
test_read_fslversion
():
with
inst
.
tempdir
()
as
cwd
:
os
.
mkdir
(
'etc'
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment