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
Bliss
bliss
Commits
08a7355c
Commit
08a7355c
authored
Jul 09, 2021
by
Jibril Mammeri
Browse files
Same number of decimals to compare velocity
parent
b8c8128a
Pipeline
#50547
failed with stages
in 130 minutes and 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bliss/common/axis.py
View file @
08a7355c
...
...
@@ -1298,7 +1298,7 @@ class Axis(Scannable):
_user_vel
=
self
.
__controller
.
read_velocity
(
self
)
/
abs
(
self
.
steps_per_unit
)
if
new_velocity
!=
_user_vel
:
if
not
math
.
isclose
(
new_velocity
,
_user_vel
,
rel_tol
=
1e-4
)
:
log_warning
(
self
,
f
"Controller velocity (
{
_user_vel
}
) is different from set velocity (
{
new_velocity
}
)"
,
...
...
tests/shell/test_standard.py
View file @
08a7355c
...
...
@@ -244,8 +244,8 @@ OUTPUT_UMV_CALC_MOT2 = """
calc_mot2[keV] calc_mot1[keV] roby
\x1b
[Fuser 0.000 0.000 0.000
dial 0.000 0.000 0.000
\x1b
[Fuser 4.000 2.000
1.000
dial 4.000 2.000
1.000
dial 0.000 0.000 0.000
\x1b
[Fuser
8.000
4.000 2.000
dial
8.000
4.000 2.000
"""
...
...
@@ -259,7 +259,7 @@ def test_umv_shell(capfd, default_session):
def
test_umv_calc_shell
(
capfd
,
default_session
):
calc_mot2
=
default_session
.
config
.
get
(
"calc_mot2"
)
try
:
umv
(
calc_mot2
,
4
)
umv
(
calc_mot2
,
8
)
output
=
capfd
.
readouterr
().
out
assert
output
==
OUTPUT_UMV_CALC_MOT2
finally
:
...
...
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