def test_close_process_when_aborted():
 with pipeline.get_cat_pipeline(pipeline.PIPE, pipeline.PIPE) as pl:
  assert (len(pl.commands) == 1)
  assert (pl.commands[0]._process.poll() is None)
  pl.abort()
 pipeline_wait(pl)

def test_close_process_when_aborted ( ) : with pipeline . get_cat_pipeline ( pipeline . PIPE , pipeline . PIPE ) as pl : assert ( len ( pl . commands ) == 1 ) assert ( pl . commands [ 0 ] . _process . poll ( ) is None ) pl . abort ( ) pipeline_wait ( pl )
process leaks must not occur when the pipeline is aborted .