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
Bliss
bliss
Commits
d6ef5ba9
Commit
d6ef5ba9
authored
Feb 17, 2021
by
Benoit Formet
Committed by
Matias Guijarro
Mar 04, 2021
Browse files
test_standard: test umv output
parent
524ba28c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/shell/test_standard.py
View file @
d6ef5ba9
...
...
@@ -246,13 +246,36 @@ def capture_output_patch():
builtins
.
print
=
orig_print
@
pytest
.
mark
.
xfail
()
def
test_umv_shell
(
capfd
,
default_session
,
capture_output_patch
):
OUTPUT_UMV_ROBY
=
"""
roby
\x1b
[Fuser 0.000
dial 0.000
\x1b
[Fuser 1.000
dial 1.000
"""
OUTPUT_UMV_CALC_MOT2
=
"""
calc_mot2[keV] calc_mot1[keV] roby
\x1b
[Fuser 4.000 2.000 1.000
dial 4.000 2.000 1.000
\x1b
[Fuser 4.000 2.000 1.000
dial 4.000 2.000 1.000
"""
def
test_umv_shell
(
capfd
,
default_session
):
roby
=
default_session
.
config
.
get
(
"roby"
)
umv
(
roby
,
1
)
output
=
capfd
.
readouterr
().
out
.
splitlines
()
# first 3 items are: empty line, motor name, empty line
assert
all
(
x
!=
""
for
x
in
output
[
3
:])
output
=
capfd
.
readouterr
().
out
assert
output
==
OUTPUT_UMV_ROBY
calc_mot2
=
default_session
.
config
.
get
(
"calc_mot2"
)
umv
(
calc_mot2
,
4
)
output
=
capfd
.
readouterr
().
out
assert
output
==
OUTPUT_UMV_CALC_MOT2
default_session
.
config
.
get
(
"calc_mot1"
).
controller
.
close
()
calc_mot2
.
controller
.
close
()
def
test_umvr_lib_mode
(
capsys
,
default_session
):
...
...
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