Skip to content

Commit 4933cea

Browse files
committed
Test 6
1 parent 82dd373 commit 4933cea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/automate/test_jobs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from xtl.automate.shells import Shell, DefaultShell, BashShell, PowerShell, CmdShell, WslShell
1010
from xtl.automate.batchfile import BatchFile
1111
from xtl.automate.jobs import Job, limited_concurrency
12+
from xtl.common.compatibility import OS_WINDOWS
1213
from xtl.exceptions.warnings import IncompatibleShellWarning
1314

1415

@@ -233,9 +234,11 @@ async def test_run_missing_batchfile(self, temp_files):
233234

234235
stdout, stderr = temp_files.with_suffix('.stdout.log'), temp_files.with_suffix('.stderr.log')
235236
await job.run_batch(batchfile=batch, stdout_log=stdout, stderr_log=stderr)
236-
if stderr.exists():
237+
if OS_WINDOWS:
237238
assert ('not recognized as an internal or external command, operable program or batch file' in
238239
stderr.read_text().replace('\n', ' '))
240+
else:
241+
assert 'No such file or directory' in stderr.read_text().replace('\n', ' ')
239242

240243
def test_update_concurrency_limit(self):
241244
j = Job('test_job')

0 commit comments

Comments
 (0)