Skip to content
Snippets Groups Projects
Commit 3a4544a7 authored by Karim Ahmed's avatar Karim Ahmed
Browse files

First pieces for test_jungfraulib

parent 94d66af9
No related branches found
No related tags found
1 merge request!713[Jungfrau][Correct][Dark] New Settings and gain mode enums to read the jungfrau correct parameters.
import pytest
from cal_tools.jungfraulib import _old_settings_to_new
@pytest.mark.parametrize(
'settings,result',
[
('dynamicgain', 'gain0'),
('dynamichg0', 'highgain0'),
('fixgain1', 'gain0'),
('fixgain2', 'gain0'),
('forceswitchg1', 'gain0'),
('forceswitchg2', 'gain0'),
],
)
def test_old_settings_to_new_settings(settings, result):
assert _old_settings_to_new(settings, 0) == result
@pytest.mark.parametrize(
'settings,result',
[
('dynamicgain', 'dynamic'),
('dynamichg0', 'dynamic'),
('fixgain1', 'fixg1'),
('fixgain2', 'fixg2'),
('forceswitchg1', 'forceswitchg1'),
('forceswitchg2', 'forceswitchg2'),
],
)
def test_old_settings_to_new_mode(settings, result):
assert _old_settings_to_new(settings, 1) == result
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment