Skip to content

Commit

Permalink
Reuse echo redirection code between OSes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Karetnikov committed Oct 22, 2023
1 parent 0ad9f5a commit 348357a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions conda-store-server/tests/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ def test_function(context):
if sys.platform == "win32":
# echo is not a separate program on Windows
context.run(["cmd", "/c", "echo subprocess"])
context.run("echo subprocess_stdout", shell=True)
context.run("echo subprocess_stderr>&2", shell=True)
context.run("echo subprocess_stderr_no_redirect>&2", shell=True, redirect_stderr=False)
else:
context.run(["echo", "subprocess"])
context.run("echo subprocess_stdout", shell=True)
context.run("echo subprocess_stderr 1>&2", shell=True)
context.run("echo subprocess_stderr_no_redirect 1>&2", shell=True, redirect_stderr=False)
context.run("echo subprocess_stdout", shell=True)
context.run("echo subprocess_stderr 1>&2", shell=True)
context.run("echo subprocess_stderr_no_redirect 1>&2", shell=True, redirect_stderr=False)
context.log.info("log")
return pathlib.Path.cwd()

Expand Down

0 comments on commit 348357a

Please sign in to comment.