@@ -227,24 +227,24 @@ def test_stdsim_line_buffering(base_app):
227
227
def pr_none ():
228
228
import subprocess
229
229
230
+ # Start a long running process so we have time to run tests on it before it finishes
230
231
# Put the new process into a separate group so signals sent to it won't interfere with this process
231
232
if sys .platform .startswith ('win' ):
232
- command = 'dir '
233
+ command = 'timeout -t 5 /nobreak '
233
234
creationflags = subprocess .CREATE_NEW_PROCESS_GROUP
234
235
start_new_session = False
235
236
else :
236
- command = 'ls '
237
+ command = 'sleep 5 '
237
238
creationflags = 0
238
239
start_new_session = True
239
240
240
- proc = subprocess .Popen ([ command ] ,
241
+ proc = subprocess .Popen (command ,
241
242
creationflags = creationflags ,
242
243
start_new_session = start_new_session ,
243
244
shell = True )
244
245
pr = cu .ProcReader (proc , None , None )
245
246
return pr
246
247
247
- @pytest .mark .skipif (sys .platform == 'linux' , reason = "Test doesn't work correctly on TravisCI" )
248
248
def test_proc_reader_send_sigint (pr_none ):
249
249
assert pr_none ._proc .poll () is None
250
250
pr_none .send_sigint ()
@@ -255,8 +255,6 @@ def test_proc_reader_send_sigint(pr_none):
255
255
else :
256
256
assert ret_code == - signal .SIGINT
257
257
258
- @pytest .mark .skipif (not sys .platform .startswith ('win' ),
259
- reason = "Test doesn't work correctly on TravisCI and is unreliable on Azure DevOps macOS" )
260
258
def test_proc_reader_terminate (pr_none ):
261
259
assert pr_none ._proc .poll () is None
262
260
pr_none .terminate ()
@@ -267,13 +265,6 @@ def test_proc_reader_terminate(pr_none):
267
265
else :
268
266
assert ret_code == - signal .SIGTERM
269
267
270
- @pytest .mark .skipif (not sys .platform .startswith ('win' ),
271
- reason = "Test doesn't work correctly on TravisCI and is unreliable on Azure DevOps macOS" )
272
- def test_proc_reader_wait (pr_none ):
273
- assert pr_none ._proc .poll () is None
274
- pr_none .wait ()
275
- assert pr_none ._proc .poll () == 0
276
-
277
268
278
269
@pytest .fixture
279
270
def context_flag ():
0 commit comments