Skip to content

Commit 61f226b

Browse files
author
Sylvain MARIE
committed
Fixed commands separator and associated test
1 parent da6cf15 commit 61f226b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

doit_api/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ def _procline(l):
10211021
return [l for l in lines if len(l) > 0]
10221022

10231023

1024-
OS_CMD_SEP = ' & ' if platform.system() == 'Windows' else ' ; '
1024+
OS_CMD_SEP = '& ' if platform.system() == 'Windows' else '; '
10251025

10261026

10271027
def join_cmds(cmds_list):

doit_api/tests/core/test_task_and_taskgen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def d_():
102102
assert len(task_d) == 1
103103
task_d = task_d[0]
104104
assert len(task_d.actions) == 2
105-
_sep = ' & ' if platform.system() == 'Windows' else ' ; '
105+
_sep = '& ' if platform.system() == 'Windows' else '; '
106106
assert task_d.actions[1]._action.split(_sep) == ["echo ola", "echo hey"]
107107

108108
# ---- checks : list
@@ -143,7 +143,7 @@ def d_():
143143
with capsys.disabled():
144144
assert captured.out.replace("\r", "") == """hello !
145145
hello !!
146-
ola
146+
ola
147147
hey
148148
Running <Task: c:echo> because one of its targets does not exist: 'hoho.txt'
149149
hi
@@ -193,7 +193,7 @@ def d_():
193193
with capsys.disabled():
194194
assert captured.out.replace("\r", "") == """hello !
195195
hello !!
196-
ola
196+
ola
197197
hey
198198
Running <Task: c:echo> because one of its targets does not exist: 'hoho.txt'
199199
hi

0 commit comments

Comments
 (0)