Format: text/x-python
⬇ Download File (715 B)
   1  """Some simple tests for the plugin while running scripts.
   2  """
   3  # Module imports
   4  # Std lib
   5  import inspect
   6  
   7  # Our own
   8  
   9  #-----------------------------------------------------------------------------
  10  # Testing functions
  11  
  12  def test_trivial():
  13      """A trivial passing test."""
  14      pass
  15  
  16  def doctest_run():
  17      """Test running a trivial script.
  18  
  19      In [13]: run simplevars.py
  20      x is: 1
  21      """
  22  
  23  def doctest_runvars():
  24      """Test that variables defined in scripts get loaded correctly via %run.
  25  
  26      In [13]: run simplevars.py
  27      x is: 1
  28  
  29      In [14]: x
  30      Out[14]: 1
  31      """
  32  
  33  def doctest_ivars():
  34      """Test that variables defined interactively are picked up.
  35      In [5]: zz=1
  36  
  37      In [6]: zz
  38      Out[6]: 1
  39      """
  40