Skip to content

Commit

Permalink
Expected foobar
Browse files Browse the repository at this point in the history
  • Loading branch information
fizyk committed May 6, 2021
1 parent ccce7a2 commit a2a486a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/executors/test_executor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# mypy: no-strict-optional
"""Test basic executor functionality."""
import gc
import platform
import shlex
from subprocess import check_output
import uuid
Expand Down Expand Up @@ -104,6 +105,10 @@ def test_context_stopped():


ECHO_FOOBAR = 'echo "foobar"'
if platform.system() == "Windows":
EXPECTED_FOOBAR = '"foobar"'
else:
EXPECTED_FOOBAR ='foobar'


@pytest.mark.parametrize("command", (ECHO_FOOBAR, shlex.split(ECHO_FOOBAR)))
Expand All @@ -112,7 +117,7 @@ def test_process_output(command):
executor = SimpleExecutor(command)
executor.start()

assert executor.output().read() == "foobar\n"
assert executor.output().read() == EXPECTED_FOOBAR + "\n"
executor.stop()


Expand All @@ -122,7 +127,7 @@ def test_process_output_shell(command):
executor = SimpleExecutor(command, shell=True)
executor.start()

assert executor.output().read().strip() == "foobar"
assert executor.output().read().strip() == EXPECTED_FOOBAR
executor.stop()


Expand Down

0 comments on commit a2a486a

Please sign in to comment.