#NEWLINE# def test_printProgressBarReporting( self ) : #NEWLINE# #INDENT# "\n        L{StdioClient._printProgressBar} prints a progress description,\n        including percent done, amount transferred, transfer rate, and time\n        remaining, all based the given start time, the given L{FileWrapper}'s\n        progress information and the reactor's current time.\n        " #NEWLINE# self . setKnownConsoleSize ( 10 , 34 ) #NEWLINE# clock = self . client . reactor = Clock ( ) #NEWLINE# wrapped = StringIO ( 'x' ) #NEWLINE# wrapped . name = 'sample' #NEWLINE# wrapper = cftp . FileWrapper ( wrapped ) #NEWLINE# wrapper . size = ( 1024 * 10 ) #NEWLINE# startTime = clock . seconds ( ) #NEWLINE# clock . advance ( 2.0 ) #NEWLINE# wrapper . total += 4096 #NEWLINE# self . client . _printProgressBar ( clock , startTime ) #NEWLINE# self . assertEqual ( self . client . transport . value ( ) , '\rsample 40% 4.0kB 2.0kBps 00:03 ' )