Ticket #11100: 11100_test_executable.patch

File 11100_test_executable.patch, 2.8 KB (added by jdemeyer, 9 years ago)
  • sage/tests/cmdline.py

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1301573234 -7200
    # Node ID 503e34189f14cc54a8c5f55717fba5d3350b9f4c
    # Parent  2a119871afcfdd138620ae813ed3549994971ea4
    #11100: Increase default timeout of test_executable() to 50 seconds
    
    diff -r 2a119871afcf -r 503e34189f14 sage/tests/cmdline.py
    a b  
    3838from subprocess import *
    3939import os, select
    4040
    41 def test_executable(args, input="", timeout=10.0):
     41def test_executable(args, input="", timeout=50.0):
    4242    """
    4343    Run the program defined by ``args`` using the string ``input`` on
    4444    the standard input.
     
    7171
    7272    We test the timeout option::
    7373
    74         sage: (out, err, ret) = test_executable(["sleep", "1"], "", 0.1)
     74        sage: (out, err, ret) = test_executable(["sleep", "1"], timeout=0.1)
    7575        Traceback (most recent call last):
    7676        ...
    7777        RuntimeError: timeout in test_executable()
    7878
    7979    TESTS::
    8080   
    81         sage: (out, err, ret) = test_executable(["sage"], timeout=50)
     81        sage: (out, err, ret) = test_executable(["sage"])
    8282        sage: out.find(version()) >= 0
    8383        True
    8484        sage: err
     
    8686        sage: ret
    8787        0
    8888   
    89         sage: (out, err, ret) = test_executable(["sage"], "3^33\n", timeout=50)
     89        sage: (out, err, ret) = test_executable(["sage"], "3^33\n")
    9090        sage: out.find(version()) >= 0
    9191        True
    9292        sage: out.find("5559060566555523") >= 0
     
    9696        sage: ret
    9797        0
    9898   
    99         sage: (out, err, ret) = test_executable(["sage", "-q"], "3^33\n", timeout=50)
     99        sage: (out, err, ret) = test_executable(["sage", "-q"], "3^33\n")
    100100        sage: out.find(version()) >= 0
    101101        False
    102102        sage: out.find("5559060566555523") >= 0
     
    106106        sage: ret
    107107        0
    108108   
    109         sage: (out, err, ret) = test_executable(["sage", "-c", "print 3^33"], timeout=50)
     109        sage: (out, err, ret) = test_executable(["sage", "-c", "print 3^33"])
    110110        sage: out.find("5559060566555523\n") >= 0
    111111        True
    112112        sage: err
     
    114114        sage: ret
    115115        0
    116116   
    117         sage: (out, err, ret) = test_executable(["sage", "--min", "-c", "print 3^33"], timeout=50)
     117        sage: (out, err, ret) = test_executable(["sage", "--min", "-c", "print 3^33"])
    118118        sage: out.find("5559060566555523\n") >= 0
    119119        True
    120120        sage: err
     
    170170        sage: ret
    171171        0
    172172   
    173         sage: (out, err, ret) = test_executable(["sage", "--startuptime"], timeout=50)
     173        sage: (out, err, ret) = test_executable(["sage", "--startuptime"])
    174174        sage: out.find("sage.all: ") >= 0
    175175        True
    176176        sage: err