#NEWLINE# def test_matrix( self ) : #NEWLINE# #INDENT# has_lang_opts = [ True , False ] #NEWLINE# i = 0 #NEWLINE# for has_scala in has_lang_opts : #NEWLINE# #INDENT# for has_r in has_lang_opts : #NEWLINE# #INDENT# for has_python in has_lang_opts : #NEWLINE# #INDENT# for has_java in has_lang_opts : #NEWLINE# #INDENT# temp_dir = tempfile . mkdtemp ( ) #NEWLINE# name = ( 'test/trial-%s' % i ) #NEWLINE# langs = [ ] #NEWLINE# if has_java : #NEWLINE# #INDENT# langs . append ( '-j' ) #NEWLINE# #UNINDENT# if has_scala : #NEWLINE# #INDENT# langs . append ( '-s' ) #NEWLINE# #UNINDENT# if has_python : #NEWLINE# #INDENT# langs . append ( '-p' ) #NEWLINE# #UNINDENT# if has_r : #NEWLINE# #INDENT# langs . append ( '-r' ) #NEWLINE# #UNINDENT# if ( ( not has_java ) and ( not has_scala ) and ( not has_python ) and ( not has_r ) ) : #NEWLINE# #INDENT# has_scala = True #NEWLINE# #UNINDENT# p = run_cmd ( ( [ 'init' , '-n' , name , '-o' , temp_dir ] + langs ) ) #NEWLINE# communicate ( p , '1' ) #NEWLINE# self . assertTrue ( ( p . returncode == 0 ) ) #NEWLINE# check_scala_files ( self , temp_dir , name , exists = has_scala ) #NEWLINE# check_base_files ( self , temp_dir , name ) #NEWLINE# check_sbt_files ( self , temp_dir , name , exists = ( has_scala | has_java ) ) #NEWLINE# check_python_files ( self , temp_dir , name , exists = has_python ) #NEWLINE# check_r_files ( self , temp_dir , name , exists = has_r ) #NEWLINE# check_java_files ( self , temp_dir , name , exists = has_java ) #NEWLINE# clean_dir ( self , temp_dir ) #NEWLINE# i += 1