'Test for issue #442'

def test_setup_teardown_output_and_test_failure(self, testdir):

    testdir.makepyfile('\n                                                def    setup_function(function):\n                                                                print    ("setup    func")\n\n                                                def    test_fail():\n                                                                assert    0,    "failingfunc"\n\n                                                def    teardown_function(function):\n                                                                print    ("teardown    func")\n                                ')
    result = testdir.runpytest()
    result.stdout.fnmatch_lines(['*test_fail*', '*def    test_fail():', '*failingfunc*', '*Captured    stdout    setup*', '*setup    func*', '*Captured    stdout    teardown*', '*teardown    func*', '*1    failed*'])
