##// END OF EJS Templates
Show (Call) Signature of object first....
Show (Call) Signature of object first. When user press Shift+Tab to call up a Tooltip to show the information of a function/method/callable object, I suggest IPython display (Call) Signature fist, so that users can know to call the function quickly. For object with much information, the (Call) Signature will be hidden in Jupyter Notebook.

File last commit:

r22076:6f1f1ae4
r22852:ee66c768
Show More
test_displayhook.py
28 lines | 850 B | text/x-python | PythonLexer
from IPython.testing.tools import AssertPrints, AssertNotPrints
ip = get_ipython()
def test_output_displayed():
"""Checking to make sure that output is displayed"""
with AssertPrints('2'):
ip.run_cell('1+1', store_history=True)
with AssertPrints('2'):
ip.run_cell('1+1 # comment with a semicolon;', store_history=True)
with AssertPrints('2'):
ip.run_cell('1+1\n#commented_out_function();', store_history=True)
def test_output_quiet():
"""Checking to make sure that output is quiet"""
with AssertNotPrints('2'):
ip.run_cell('1+1;', store_history=True)
with AssertNotPrints('2'):
ip.run_cell('1+1; # comment with a semicolon', store_history=True)
with AssertNotPrints('2'):
ip.run_cell('1+1;\n#commented_out_function()', store_history=True)