test_compat.py 文件源码

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

项目:PyDataLondon29-EmbarrassinglyParallelDAWithAWSLambda 作者: SignalMedia 项目源码 文件源码
def test_compat():
    # test we have compat with our version of nu

    from pandas.computation import _NUMEXPR_INSTALLED
    try:
        import numexpr as ne
        ver = ne.__version__
        if ver == LooseVersion('2.4.4'):
            assert not _NUMEXPR_INSTALLED
        elif ver < LooseVersion('2.1'):
            with tm.assert_produces_warning(UserWarning,
                                            check_stacklevel=False):
                assert not _NUMEXPR_INSTALLED
        else:
            assert _NUMEXPR_INSTALLED

    except ImportError:
        raise nose.SkipTest("not testing numexpr version compat")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号