Ticket #12719: 12719-test-displayhook.patch

File 12719-test-displayhook.patch, 705 bytes (added by jason, 9 years ago)

apply to scripts repository in local/bin/

  • sage-doctest

    # HG changeset patch
    # User Jason Grout <jason.grout@drake.edu>
    # Date 1349973230 18000
    # Node ID f7a7dddf8dfeaa8917d68d49c8becaf055127ac2
    # Parent  b068c4eb39997f4a47996d5d6221f3673070cbbc
    Set the display hook when testing.
    
    diff --git a/sage-doctest b/sage-doctest
    a b  
    490490
    491491"""  % os.path.join(os.getcwd(), file_name)
    492492    s += "from sage.all_cmdline import *; \n"
     493    s += "import sage.misc.displayhook\n"
     494    s += "import sys\n"
     495    s += "sys.displayhook = sage.misc.displayhook.DisplayHook(sys.displayhook)\n"
    493496    s += "import sage.plot.plot; sage.plot.plot.DOCTEST_MODE=True\n"  # turn off image popup
    494497    s += r"""
    495498def warning_function(f):