Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
bliss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
531
Issues
531
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Merge Requests
133
Merge Requests
133
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bliss
bliss
Commits
47e08db9
Commit
47e08db9
authored
Mar 01, 2018
by
Jose Tiago Macara Coutinho
Committed by
Vincent Michel
Mar 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pepu: add tests on channel configuration
parent
422caab0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
tests/controllers_hw/test_pepu.py
tests/controllers_hw/test_pepu.py
+22
-1
No files found.
tests/controllers_hw/test_pepu.py
View file @
47e08db9
...
...
@@ -10,7 +10,7 @@ Run with:
import
pytest
from
bliss.common
import
scans
from
bliss.controllers.pepu
import
PEPU
,
Signal
,
Trigger
from
bliss.controllers.pepu
import
PEPU
,
Signal
,
Trigger
,
ChannelMode
pytestmark
=
pytest
.
mark
.
pepu
...
...
@@ -46,6 +46,27 @@ def test_read_in_channels(pepu, channel_id):
assert
channel
.
value
in
[
-
1.
,
0.
]
@
pytest
.
mark
.
parametrize
(
"channel_id"
,
range
(
1
,
7
))
def
test_in_channel_config
(
pepu
,
channel_id
):
channel
=
pepu
.
in_channels
[
channel_id
]
# test state
enabled
=
channel
.
enabled
assert
channel
.
enabled
is
True
or
channel
.
enabled
is
False
# disabled the state
channel
.
enabled
=
False
assert
channel
.
enabled
is
False
# test mode
mode
=
channel
.
mode
assert
channel
.
mode
in
tuple
(
ChannelMode
)
channel
.
mode
=
ChannelMode
.
BISS
assert
channel
.
mode
==
ChannelMode
.
BISS
@
pytest
.
mark
.
parametrize
(
"channel_id"
,
[
7
,
8
])
def
test_read_out_channels
(
pepu
,
channel_id
):
channel
=
pepu
.
out_channels
[
channel_id
]
...
...
Write
Preview
Markdown
is supported
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