test_Plot2D.py 文件源码

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

项目:cube_browser 作者: SciTools 项目源码 文件源码
def test_slider_slice_warning(self):
        index = 3
        kwargs = dict(grid_longitude=index)
        coords = ('time', 'grid_latitude')
        plot = Plot2D(self.cube, self.axes, coords=coords)
        plot.alias(wibble=2)
        wmsg = ("expected to be called with alias 'wibble' for dimension 2, "
                "rather than with 'grid_longitude'")
        with warnings.catch_warnings():
            # Cause all warnings to raise an exception.
            warnings.simplefilter('error')
            with self.assertRaisesRegexp(UserWarning, wmsg):
                plot(**kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号