test_monitoring.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:pecos 作者: sandialabs 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号