Changes between Initial Version and Version 1 of Ticket #20322, comment 25


Ignore:
Timestamp:
04/01/16 12:04:05 (6 years ago)
Author:
embray
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20322, comment 25

    initial v1  
    11I still think that if a test is expecting something particular about the environment that it should set that environment for the test.  For example something like
    22{{{
     3#!diff
    34diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py
    45index 534436d..1d0395e 100644
     
    1920 
    2021-        sage: (out, err, ret) = test_executable(["sage"])
    21 +        sage: (out, err, ret) = test_executable(["sage"], env={'SAGE_BANNER': '
     22+        sage: (out, err, ret) = test_executable(["sage"], env={'SAGE_BANNER': 'bare'})
    2223         sage: out.find(version()) >= 0
    2324         True
    2425         sage: err
    2526@@ -110,7 +110,7 @@ def test_executable(args, input="", timeout=100.0, **kwds):
    26 ...skipping...
    27 +        sage: (out, err, ret) = test_executable(["sage", "-q"], "3^33\n", env={
     27         sage: ret
     28         0
     29 
     30-        sage: (out, err, ret) = test_executable(["sage"], "3^33\n")
     31+        sage: (out, err, ret) = test_executable(["sage"], "3^33\n", env={'SAGE_BANNER': 'bare'})
     32         sage: out.find(version()) >= 0
     33         True
     34         sage: out.find("5559060566555523") >= 0
     35@@ -120,7 +120,7 @@ def test_executable(args, input="", timeout=100.0, **kwds):
     36         sage: ret
     37         0
     38 
     39-        sage: (out, err, ret) = test_executable(["sage", "-q"], "3^33\n")
     40+        sage: (out, err, ret) = test_executable(["sage", "-q"], "3^33\n", env={'SAGE_BANNER': 'bare'})
    2841         sage: out.find(version()) >= 0
    2942         False
     
    3548-        ....:         return False
    3649+        ....:         return False
    37          sage: (out, err, ret) = test_executable(["sage", "--ecl"], "(* 12345 54
     50         sage: (out, err, ret) = test_executable(["sage", "--ecl"], "(* 12345 54321)\n")
    3851         sage: out.find("Embeddable Common-Lisp") >= 0
    3952         True
     
    4558+    pexpect_env.update(env)
    4659+
    47      p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=pexpect_env, **kw
     60     p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=pexpect_env, **kwds)
    4861     if input:
    4962         p.stdin.write(input)
     63
    5064}}}