#NEWLINE# def test_download_interrupted( self , httpbin_both ) : #NEWLINE# #INDENT# devnull = open ( os . devnull , 'w' ) #NEWLINE# downloader = Downloader ( output_file = devnull , progress_file = devnull ) #NEWLINE# downloader . start ( Response ( url = ( httpbin_both . url + '/' ) , headers = { #NEWLINE# #INDENT# 'Content-Length' : 5 , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# downloader . chunk_downloaded ( b'1234' ) #NEWLINE# downloader . finish ( ) #NEWLINE# assert downloader . interrupted