MCPcopy Create free account
hub / github.com/ipython/ipython / doctest_who

Function doctest_who

IPython/core/tests/test_magic.py:575–598  ·  view source on GitHub ↗

doctest for %who In [1]: %reset -f In [2]: alpha = 123 In [3]: beta = 'beta' In [4]: %who int alpha In [5]: %who str beta In [6]: %whos Variable Type Data/Info ---------------------------- alpha int 123 beta

()

Source from the content-addressed store, hash-verified

573 nt.assert_equal(monitor, [1])
574
575def doctest_who():
576 """doctest for %who
577
578 In [1]: %reset -f
579
580 In [2]: alpha = 123
581
582 In [3]: beta = 'beta'
583
584 In [4]: %who int
585 alpha
586
587 In [5]: %who str
588 beta
589
590 In [6]: %whos
591 Variable Type Data/Info
592 ----------------------------
593 alpha int 123
594 beta str beta
595
596 In [7]: %who_ls
597 Out[7]: ['alpha', 'beta']
598 """
599
600def test_whos():
601 """Check that whos is protected against objects where repr() fails."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected