ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DataQuality
DQUtils
tests
test_iovset_pickle.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4
5
from
DQUtils
import
fetch_iovs, process_iovs
6
from
pickle
import
loads, dumps
7
8
def
test_serializer
():
9
"""
10
Try serializing a fairly complicated iovset object
11
"""
12
iovs = fetch_iovs(
"DEFECTS"
, runs=359918)
13
14
channels, iovsets = iovs.chans_iovsets
15
16
processed = [(since, until, states)
17
for
since, until, states
in
process_iovs(*iovsets)]
18
19
serialized = dumps(processed)
20
deserialized = loads(serialized)
21
22
assert
deserialized == processed
23
24
if
__name__ ==
'__main__'
:
25
test_serializer
()
test_iovset_pickle.test_serializer
test_serializer()
Definition
test_iovset_pickle.py:8
Generated on
for ATLAS Offline Software by
1.17.0