test_refs.py 715 B

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