#NEWLINE# def test_junit_run_with_cobertura_coverage_succeeds( self ) : #NEWLINE# #INDENT# with self . pants_results ( [ 'clean-all' , 'test.junit' , 'testprojects/tests/java/org/pantsbuild/testproject/unicode::' , '--test-junit-coverage-processor=cobertura' , '--test-junit-coverage' ] ) as results : #NEWLINE# #INDENT# self . assert_success ( xml ) #NEWLINE# coverage_xml = os . path . join ( results . workdir , 'test/junit/coverage/xml/coverage.xml' ) #NEWLINE# self . assertTrue ( os . path . isfile ( coverage_xml ) ) #NEWLINE# with codecs . open ( coverage_xml , 'r' , encoding = 'utf8' ) as xml : #NEWLINE# #INDENT# self . assertIn ( 'line-rate="1.0"' , xml . read ( ) ) #NEWLINE# #UNINDENT# cucumber_src_html = os . path . join ( results . workdir , 'test/junit/coverage/html/org.pantsbuild.testproject.unicode.cucumber.CucumberAnnotatedExample.html' ) #NEWLINE# self . assertTrue ( os . path . isfile ( cucumber_src_html ) ) #NEWLINE# with codecs . open ( cucumber_src_html , 'r' , encoding = 'utf8' ) as src : #NEWLINE# #INDENT# self . assertIn ( 'String pleasantry()' , src . read ( ) )