本文整理汇总了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))