#NEWLINE# def test_conditionalExtensions( self ) : #NEWLINE# #INDENT# '\n        Passing C{conditionalExtensions} as a list of L{ConditionalExtension}\n        objects to get_setup_args inserts a custom build_ext into the result\n        which knows how to check whether they should be \n        ' #NEWLINE# good_ext = ConditionalExtension ( 'whatever' , [ 'whatever.c' ] , condition = ( lambda b : True ) ) #NEWLINE# bad_ext = ConditionalExtension ( 'whatever' , [ 'whatever.c' ] , condition = ( lambda b : False ) ) #NEWLINE# args = get_setup_args ( conditionalExtensions = [ self , bad_ext ] ) #NEWLINE# self . assertEquals ( args [ 'ext_modules' ] , [ good_ext , bad_ext ] ) #NEWLINE# cmdclass = args [ 'cmdclass' ] #NEWLINE# build_ext = cmdclass [ 'build_ext' ] #NEWLINE# builder = build_ext ( Distribution ( ) ) #NEWLINE# builder . prepare_extensions ( ) #NEWLINE# self . assertEquals ( builder . extensions , [ good_ext ] )