#NEWLINE# def test_defaults( self ) : #NEWLINE# #INDENT# options = self . _parse ( './pants compile.java -n33' ) #NEWLINE# self . assertEqual ( 99 , options . for_global_scope ( ) . num ) #NEWLINE# self . assertEqual ( 99 , options . for_scope ( 'compile' ) . num ) #NEWLINE# self . assertEqual ( 33 , options . for_scope ( 'compile.java' ) . num ) #NEWLINE# self . assertEqual ( 99 , options . for_scope ( 'test' ) . num ) #NEWLINE# self . assertEqual ( 99 , options . for_scope ( 'test.junit' ) . num ) #NEWLINE# options = self . _parse ( './pants compile -n22 compile.java -n33' ) #NEWLINE# self . assertEqual ( 99 , options . for_global_scope ( ) . num ) #NEWLINE# self . assertEqual ( 22 , options . for_scope ( 'compile' ) . num ) #NEWLINE# self . assertEqual ( 33 , options . for_scope ( 'compile.java' ) . num ) #NEWLINE# config = { #NEWLINE# #INDENT# 'DEFAULT' : { #NEWLINE# #INDENT# 'num' : '88' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'compile' : { #NEWLINE# #INDENT# 'num' : '77' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'compile.java' : { #NEWLINE# #INDENT# 'num' : '66' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# options = self . _parse ( './pants compile.java -n22' , config = config ) #NEWLINE# self . assertEqual ( 88 , options . for_global_scope ( ) . num ) #NEWLINE# self . assertEqual ( 77 , options . for_scope ( 'compile' ) . num ) #NEWLINE# self . assertEqual ( 22 , options . for_scope ( 'compile.java' ) . num ) #NEWLINE# env = { #NEWLINE# #INDENT# 'PANTS_COMPILE_NUM' : '55' , #NEWLINE# #UNINDENT# } #NEWLINE# options = self . _parse ( './pants compile' , env = env , config = env ) #NEWLINE# self . assertEqual ( 88 , options . for_global_scope ( ) . num ) #NEWLINE# self . assertEqual ( 55 , options . for_scope ( 'compile' ) . num ) #NEWLINE# self . assertEqual ( 55 , options . for_scope ( 'compile.java' ) . num ) #NEWLINE# options = self . _parse ( './pants compile.java -n44' , env = env , config = config ) #NEWLINE# self . assertEqual ( 88 , options . for_global_scope ( ) . num ) #NEWLINE# self . assertEqual ( 55 , options . for_scope ( 'compile' ) . num ) #NEWLINE# self . assertEqual ( 44 , options . for_scope ( 'compile.java' ) . num )