Skip to content
Snippets Groups Projects
Commit 58dfe3bf authored by Patrick Godwin's avatar Patrick Godwin Committed by Kipp Cannon
Browse files

fxtools/utils.py: change doctest for TimeseriesFeatureQueue since doctest does...

fxtools/utils.py: change doctest for TimeseriesFeatureQueue since doctest does not play nice with defaultdict
parent 4920b368
No related branches found
No related tags found
No related merge requests found
......@@ -309,16 +309,11 @@ class TimeseriesFeatureQueue(object):
>>> queue.append(123451, 'channel1', {'trigger_time': 123451.7, 'snr': 6.5})
>>> queue.append(123452, 'channel1', {'trigger_time': 123452.4, 'snr': 5.2})
>>> # get oldest feature
>>> queue.pop()
{'timestamp': 123450, 'features': {'channel1': [{'snr': 3.0, 'trigger_time': 123450.3}]}}
>>> # flush queue and get rest of features
>>> queue.flush()
>>> len(queue)
2
>>> queue.pop()
{'timestamp': 123451, 'features': {'channel1': [{'snr': 6.5, 'trigger_time': 123451.7}]}}
>>> queue.pop()
{'timestamp': 123452, 'features': {'channel1': [{'snr': 5.2, 'trigger_time': 123452.4}]}}
>>> row = queue.pop()
>>> row['timestamp']
123450
>>> row['features']['channel1']
[{'snr': 3.0, 'trigger_time': 123450.3}]
"""
def __init__(self, channels, columns, **kwargs):
......
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