本文整理匯總了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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))