Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCData
lhc-sm-hwc
Commits
566a1237
Commit
566a1237
authored
Oct 21, 2021
by
Agata Chadaj
Browse files
revert tests
parent
a0771e6e
Pipeline
#3151791
passed with stage
in 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_notebooks.py
View file @
566a1237
...
...
@@ -92,13 +92,13 @@ HWC_NOTEBOOKS = [nb for notebooks in [RQ_NOTEBOOKS, RB_NOTEBOOKS, NQPS_NOTEBOOKS
IPQ_NOTEBOOKS
,
IPD_NOTEBOOKS
,
PGC_NOTEBOOKS
]
for
nb
in
notebooks
]
FGC_SEARCH_NOTEBOOKS
=
[
#
('600A', 'AN_600A_with_without_EE_FPA', 'RQS.R8B2', 1619628657780000000),
#
('60A', 'AN_60A_FPA', 'RCBH11.L8B1', 1611775844600000000),
#
('80-120A', 'AN_80-120A_FPA', 'RCBCH5.L5B2', 1611679450120000000),
#
('ipd', 'AN_IPD_FPA', 'RD1.L2', 1612443650160000000),
#
('ipq', 'AN_IPQ_FPA', 'RQ10.L4', 1614319551500000000),
#
('it', 'AN_IT_FPA', 'RQX.L5', 1611929411340000000),
#
('rb', 'AN_RB_FPA', 'RB.A12', 1622876168900000000),
(
'600A'
,
'AN_600A_with_without_EE_FPA'
,
'RQS.R8B2'
,
1619628657780000000
),
(
'60A'
,
'AN_60A_FPA'
,
'RCBH11.L8B1'
,
1611775844600000000
),
(
'80-120A'
,
'AN_80-120A_FPA'
,
'RCBCH5.L5B2'
,
1611679450120000000
),
(
'ipd'
,
'AN_IPD_FPA'
,
'RD1.L2'
,
1612443650160000000
),
(
'ipq'
,
'AN_IPQ_FPA'
,
'RQ10.L4'
,
1614319551500000000
),
(
'it'
,
'AN_IT_FPA'
,
'RQX.L5'
,
1611929411340000000
),
(
'rb'
,
'AN_RB_FPA'
,
'RB.A12'
,
1622876168900000000
),
(
'rb'
,
'AN_RB_FPA_SNAP'
,
'RB.A12'
,
1620970127420000000
)
]
...
...
@@ -141,19 +141,19 @@ def setup():
version
=
lhcsmapi
.
parse_lhcsmhwc_version
(
init_path
)
os
.
environ
[
lhcsmapi
.
nb_version_env
]
=
version
#
#
@pytest.mark.parametrize('directory,notebook,hwc_test,circuit_name,campaign,t_start,t_end', HWC_NOTEBOOKS)
#
def test_hwc_notebook(directory, notebook, hwc_test, circuit_name, campaign, t_start, t_end):
#
_test_notebook(directory,
#
notebook,
#
{
#
'hwc_test': hwc_test,
#
'circuit_name': circuit_name,
#
'campaign': campaign,
#
't_start': t_start,
#
't_end': t_end,
#
'is_automatic': True
#
})
@
pytest
.
mark
.
parametrize
(
'directory,notebook,hwc_test,circuit_name,campaign,t_start,t_end'
,
HWC_NOTEBOOKS
)
def
test_hwc_notebook
(
directory
,
notebook
,
hwc_test
,
circuit_name
,
campaign
,
t_start
,
t_end
):
_test_notebook
(
directory
,
notebook
,
{
'hwc_test'
:
hwc_test
,
'circuit_name'
:
circuit_name
,
'campaign'
:
campaign
,
't_start'
:
t_start
,
't_end'
:
t_end
,
'is_automatic'
:
True
})
@
pytest
.
mark
.
parametrize
(
'directory,notebook,circuit_name,timestamp_fgc'
,
FGC_SEARCH_NOTEBOOKS
)
...
...
@@ -167,43 +167,43 @@ def test_fgc_search_notebook(directory, notebook, circuit_name, timestamp_fgc):
'is_automatic'
:
True
})
#
#
@pytest.mark.parametrize('directory,notebook,circuit_type,circuit_names,timestamps_fgc',
#
FGC_2_SEARCH_NOTEBOOKS)
#
def test_fgc_2_search_notebook(directory, notebook, circuit_type, circuit_names, timestamps_fgc):
#
_test_notebook(directory,
#
notebook,
#
{
#
'circuit_type': circuit_type,
#
'circuit_names': circuit_names,
#
'timestamps_fgc': timestamps_fgc,
#
'author': 'test',
#
'is_automatic': True
#
})
#
#
#
@pytest.mark.parametrize('directory,notebook,circuit_name,discharge_level,sources,timestamps', QH_SEARCH_NOTEBOOKS)
#
def test_qh_search_notebook(directory, notebook, circuit_name, discharge_level, sources, timestamps):
#
_test_notebook(directory,
#
notebook,
#
{
#
'circuit_name': circuit_name,
#
'discharge_level': discharge_level,
#
'sources': sources,
#
'timestamps': timestamps,
#
'is_automatic': True
#
})
#
#
#
@pytest.mark.parametrize('directory,notebook,circuit_type,start_time,stop_time', QHD_PM_LIST)
#
def test_qh_list_notebook(directory, notebook, circuit_type, start_time, stop_time):
#
_test_notebook(directory,
#
notebook,
#
{
#
'circuit_type': circuit_type,
#
'start_time': start_time,
#
'stop_time': stop_time
#
})
@
pytest
.
mark
.
parametrize
(
'directory,notebook,circuit_type,circuit_names,timestamps_fgc'
,
FGC_2_SEARCH_NOTEBOOKS
)
def
test_fgc_2_search_notebook
(
directory
,
notebook
,
circuit_type
,
circuit_names
,
timestamps_fgc
):
_test_notebook
(
directory
,
notebook
,
{
'circuit_type'
:
circuit_type
,
'circuit_names'
:
circuit_names
,
'timestamps_fgc'
:
timestamps_fgc
,
'author'
:
'test'
,
'is_automatic'
:
True
})
@
pytest
.
mark
.
parametrize
(
'directory,notebook,circuit_name,discharge_level,sources,timestamps'
,
QH_SEARCH_NOTEBOOKS
)
def
test_qh_search_notebook
(
directory
,
notebook
,
circuit_name
,
discharge_level
,
sources
,
timestamps
):
_test_notebook
(
directory
,
notebook
,
{
'circuit_name'
:
circuit_name
,
'discharge_level'
:
discharge_level
,
'sources'
:
sources
,
'timestamps'
:
timestamps
,
'is_automatic'
:
True
})
@
pytest
.
mark
.
parametrize
(
'directory,notebook,circuit_type,start_time,stop_time'
,
QHD_PM_LIST
)
def
test_qh_list_notebook
(
directory
,
notebook
,
circuit_type
,
start_time
,
stop_time
):
_test_notebook
(
directory
,
notebook
,
{
'circuit_type'
:
circuit_type
,
'start_time'
:
start_time
,
'stop_time'
:
stop_time
})
def
_test_notebook
(
directory
,
notebook
,
notebook_parameters
):
...
...
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