#NEWLINE# def test_buildPDFRunsLaTeXThreeTimes( self ) : #NEWLINE# #INDENT# '\n        L{BookBuilder.buildPDF} runs C{latex} three times.\n        ' #NEWLINE# class InspectableBookBuilder ( BookBuilder ) : #NEWLINE# #INDENT# def __init__( self ) : #NEWLINE# #INDENT# BookBuilder . __init__ ( self ) #NEWLINE# self . commands = [ ] #NEWLINE# #UNINDENT# def run( self , command ) : #NEWLINE# #INDENT# '\n                Record the command and then execute it.\n                ' #NEWLINE# self . commands . append ( command ) #NEWLINE# return BookBuilder . run ( self , command ) #NEWLINE# #UNINDENT# #UNINDENT# bookPath = self . _setupTeXFiles ( ) #NEWLINE# outputPath = FilePath ( self . mktemp ( ) ) #NEWLINE# builder = InspectableBookBuilder ( ) #NEWLINE# builder . buildPDF ( bookPath , self . howtoDir , outputPath ) #NEWLINE# ( latex1 , latex2 , latex3 , dvips , ps2pdf13 ) = builder . commands #NEWLINE# self . assertEquals ( latex1 , latex2 ) #NEWLINE# self . assertEquals ( latex2 , bookPath ) #NEWLINE# self . assertEquals ( latex1 [ : 1 ] , [ 'latex' ] , ( 'LaTeX command %r does not seem right.' % ( latex1 , ) ) ) #NEWLINE# self . assertEquals ( latex1 [ ( - 1 ) : ] , [ bookPath . path ] , ( 'LaTeX command %r does not end with the book path (%r).' % ( latex1 , bookPath . path ) ) ) #NEWLINE# self . assertEquals ( dvips [ : 1 ] , [ 'dvips' ] , ( 'dvips command %r does not seem right.' % ( dvips , ) ) ) #NEWLINE# self . assertEquals ( ps2pdf13 [ : 1 ] , [ 'ps2pdf13' ] , ( 'ps2pdf13 command %r does not seem right.' % ( ps2pdf13 , ) ) )