#NEWLINE# @ pytest . mark . parametrize ( 'test' , [ 'assert 0' , 'assert 1' ] ) #NEWLINE# def test_attaches_with_capture_exist( report_for , test ) : #NEWLINE# #INDENT# report = report_for ( ( "\n    import sys\n    def test_x():\n        sys.stdout.write('STDOUT HELLO')\n        sys.stderr.write('STDERR HELLO')\n        %s\n    " % test ) ) #NEWLINE# assert_that ( report . find ( './/attachment' ) , contains_inanyorder ( has_entry ( 'title' , starts_with ( 'Captured stdout' ) ) , has_entry ( 'title' , starts_with ( 'Captured stderr' ) ) ) )