当前位置: 首页>>代码示例>>Python>>正文


Python completer.provisionalcompleter方法代码示例

本文整理汇总了Python中IPython.core.completer.provisionalcompleter方法的典型用法代码示例。如果您正苦于以下问题:Python completer.provisionalcompleter方法的具体用法?Python completer.provisionalcompleter怎么用?Python completer.provisionalcompleter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPython.core.completer的用法示例。


在下文中一共展示了completer.provisionalcompleter方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_tab_complete_warning

# 需要导入模块: from IPython.core import completer [as 别名]
# 或者: from IPython.core.completer import provisionalcompleter [as 别名]
def test_tab_complete_warning(self, ip):
        # https://github.com/pandas-dev/pandas/issues/16409
        pytest.importorskip('IPython', minversion="6.0.0")
        from IPython.core.completer import provisionalcompleter

        code = "import pandas as pd; c = Categorical([])"
        ip.run_code(code)
        with tm.assert_produces_warning(None):
            with provisionalcompleter('ignore'):
                list(ip.Completer.completions('c.', 1)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:12,代码来源:test_warnings.py

示例2: test_tab_complete_warning

# 需要导入模块: from IPython.core import completer [as 别名]
# 或者: from IPython.core.completer import provisionalcompleter [as 别名]
def test_tab_complete_warning(self, ip):
        # https://github.com/pandas-dev/pandas/issues/16409
        pytest.importorskip('IPython', minversion="6.0.0")
        from IPython.core.completer import provisionalcompleter

        code = "import pandas as pd; idx = pd.Index([1, 2])"
        ip.run_code(code)
        with tm.assert_produces_warning(None):
            with provisionalcompleter('ignore'):
                list(ip.Completer.completions('idx.', 4)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:12,代码来源:test_base.py

示例3: test_tab_complete_warning

# 需要导入模块: from IPython.core import completer [as 别名]
# 或者: from IPython.core.completer import provisionalcompleter [as 别名]
def test_tab_complete_warning(self, ip):
        # https://github.com/pandas-dev/pandas/issues/16409
        pytest.importorskip('IPython', minversion="6.0.0")
        from IPython.core.completer import provisionalcompleter

        code = "import pandas as pd; s = pd.Series()"
        ip.run_code(code)
        with tm.assert_produces_warning(None):
            with provisionalcompleter('ignore'):
                list(ip.Completer.completions('s.', 1)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:12,代码来源:test_api.py

示例4: test_tab_complete_warning

# 需要导入模块: from IPython.core import completer [as 别名]
# 或者: from IPython.core.completer import provisionalcompleter [as 别名]
def test_tab_complete_warning(self, ip):
        # GH 16409
        pytest.importorskip('IPython', minversion="6.0.0")
        from IPython.core.completer import provisionalcompleter

        code = "import pandas as pd; df = pd.DataFrame()"
        ip.run_code(code)
        with tm.assert_produces_warning(None):
            with provisionalcompleter('ignore'):
                list(ip.Completer.completions('df.', 1)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:12,代码来源:test_api.py

示例5: test_tab_complete_ipython6_warning

# 需要导入模块: from IPython.core import completer [as 别名]
# 或者: from IPython.core.completer import provisionalcompleter [as 别名]
def test_tab_complete_ipython6_warning(ip):
    from IPython.core.completer import provisionalcompleter
    code = dedent("""\
    import pandas.util.testing as tm
    s = tm.makeTimeSeries()
    rs = s.resample("D")
    """)
    ip.run_code(code)

    with tm.assert_produces_warning(None):
        with provisionalcompleter('ignore'):
            list(ip.Completer.completions('rs.', 1)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:14,代码来源:test_resampler_grouper.py

示例6: test_tab_complete_ipython6_warning

# 需要导入模块: from IPython.core import completer [as 别名]
# 或者: from IPython.core.completer import provisionalcompleter [as 别名]
def test_tab_complete_ipython6_warning(self, ip):
        from IPython.core.completer import provisionalcompleter
        code = dedent("""\
        import pandas.util.testing as tm
        s = tm.makeTimeSeries()
        rs = s.resample("D")
        """)
        ip.run_code(code)

        with tm.assert_produces_warning(None):
            with provisionalcompleter('ignore'):
                list(ip.Completer.completions('rs.', 1)) 
开发者ID:birforce,项目名称:vnpy_crypto,代码行数:14,代码来源:test_resample.py

示例7: test_tab_complete_warning

# 需要导入模块: from IPython.core import completer [as 别名]
# 或者: from IPython.core.completer import provisionalcompleter [as 别名]
def test_tab_complete_warning(self, ip):
        # https://github.com/pandas-dev/pandas/issues/16409
        pytest.importorskip('IPython', minversion="6.0.0")
        from IPython.core.completer import provisionalcompleter

        code = "import pandas as pd; df = pd.DataFrame()"
        ip.run_code(code)
        with tm.assert_produces_warning(None):
            with provisionalcompleter('ignore'):
                list(ip.Completer.completions('df.', 1)) 
开发者ID:birforce,项目名称:vnpy_crypto,代码行数:12,代码来源:test_api.py

示例8: test_tab_complete_warning

# 需要导入模块: from IPython.core import completer [as 别名]
# 或者: from IPython.core.completer import provisionalcompleter [as 别名]
def test_tab_complete_warning(self, ip):
        # https://github.com/pandas-dev/pandas/issues/16409
        pytest.importorskip('IPython', minversion="6.0.0")
        from IPython.core.completer import provisionalcompleter

        code = "import pandas as pd; c = pd.Categorical([])"
        ip.run_code(code)
        with tm.assert_produces_warning(None):
            with provisionalcompleter('ignore'):
                list(ip.Completer.completions('c.', 1)) 
开发者ID:securityclippy,项目名称:elasticintel,代码行数:12,代码来源:test_categorical.py


注:本文中的IPython.core.completer.provisionalcompleter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。