def test_deadsensor(self):
# dead sensor = < 1 in 5 hours
self.pm.check_delta([1, None], window=5*3600+1, absolute_value=True)
expected = pd.DataFrame(
array([['Test', 'A', Timestamp('2017-01-01 00:00:00'), Timestamp('2017-01-01 05:00:00'), 6, '|Delta| < lower bound, 1'],
['Test', 'A', Timestamp('2017-01-01 16:00:00'), Timestamp('2017-01-01 23:00:00'), 8, '|Delta| < lower bound, 1']], dtype=object),
columns=['System Name', 'Variable Name', 'Start Date', 'End Date', 'Timesteps', 'Error Flag'],
index=RangeIndex(start=0, stop=2, step=1)
)
assert_frame_equal(expected, self.pm.test_results)
评论列表
文章目录