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
928553de
Commit
928553de
authored
Jun 03, 2021
by
Matias Guijarro
Browse files
transfocator: test for pinhole fix
parent
47f9aad7
Pipeline
#47897
failed with stages
in 116 minutes and 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/controllers_sw/test_transfocator.py
View file @
928553de
...
...
@@ -18,23 +18,26 @@ def test_transfocator(default_session):
def
test_transfocator_inout
(
default_session
):
transfocator
=
default_session
.
config
.
get
(
"transfocator_simulator"
)
assert
transfocator
.
nb_pinhole
==
2
assert
transfocator
.
nb_lens
==
8
transfocator
[:]
=
0
assert
transfocator
.
pos_read
()
==
0
assert
(
transfocator
.
__info__
()
==
"Transfocator transfocator_simulator:
\n
P0 L1 L2 L3 L4 L5 L6 L7 L8
\n
OUT OUT OUT OUT OUT OUT OUT OUT OUT"
==
"Transfocator transfocator_simulator:
\n
P0 L1 L2 L3 L4 L5 L6 L7 L8
P9
\n
OUT
OUT OUT OUT OUT OUT OUT OUT OUT OUT"
)
transfocator
[:]
=
1
assert
transfocator
.
pos_read
()
==
0b111111111
assert
transfocator
.
pos_read
()
==
0b111111111
1
assert
(
transfocator
.
__info__
()
==
"Transfocator transfocator_simulator:
\n
P0 L1 L2 L3 L4 L5 L6 L7 L8
\n
IN IN IN IN IN IN IN IN IN"
==
"Transfocator transfocator_simulator:
\n
P0 L1 L2 L3 L4 L5 L6 L7 L8
P9
\n
IN
IN IN IN IN IN IN IN IN IN"
)
transfocator
.
set_all
(
False
)
assert
transfocator
.
pos_read
()
==
0
transfocator
.
set_all
()
assert
transfocator
.
pos_read
()
==
0b111111111
assert
transfocator
.
pos_read
()
==
0b111111111
1
transfocator
.
set_pin
(
False
)
assert
transfocator
.
pos_read
()
==
0b111111110
assert
transfocator
.
pos_read
()
==
0b
0
111111110
tests/test_configuration/transfocator.yml
View file @
928553de
...
...
@@ -3,7 +3,7 @@
class
:
TransfocatorMockup
name
:
transfocator_simulator
lenses
:
8
# (1)
pinhole
:
1
# (2)
pinhole
:
2
# (2)
safety
:
False
# (3)
controller_ip
:
localhost
# (4)
read_mode
:
0
# (5)
...
...
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