Changes between Initial Version and Version 1 of Ticket #20322, comment 25
 Timestamp:
 04/01/16 12:04:05 (6 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #20322, comment 25
initial v1 1 1 I 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 2 2 {{{ 3 #!diff 3 4 diff git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py 4 5 index 534436d..1d0395e 100644 … … 19 20 20 21  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'}) 22 23 sage: out.find(version()) >= 0 23 24 True 24 25 sage: err 25 26 @@ 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'}) 28 41 sage: out.find(version()) >= 0 29 42 False … … 35 48  ....: return False 36 49 + ....: 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") 38 51 sage: out.find("Embeddable CommonLisp") >= 0 39 52 True … … 45 58 + pexpect_env.update(env) 46 59 + 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) 48 61 if input: 49 62 p.stdin.write(input) 63 50 64 }}}