當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。