#NEWLINE# def test_nocache( self ) : #NEWLINE# #INDENT# with temporary_dir ( ) as cache_dir : #NEWLINE# #INDENT# bad_artifact_dir = os . path . join ( cache_dir , ZincCompile . stable_name ( ) , 'testprojects.src.java.org.pantsbuild.testproject.nocache.nocache' ) #NEWLINE# good_artifact_dir = os . path . join ( cache_dir , ZincCompile . stable_name ( ) , 'testprojects.src.java.org.pantsbuild.testproject.nocache.cache_me' ) #NEWLINE# config = { #NEWLINE# #INDENT# 'cache.compile.zinc' : { #NEWLINE# #INDENT# 'write_to' : [ cache_dir ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# pants_run = self . run_pants ( [ 'compile' , 'testprojects/src/java/org/pantsbuild/testproject/nocache::' ] , config ) #NEWLINE# self . assert_success ( pants_run ) #NEWLINE# self . assertFalse ( os . path . exists ( bad_artifact_dir ) ) #NEWLINE# self . assertEqual ( len ( os . listdir ( good_artifact_dir ) ) , 1 )