﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31513	Store failed tests in files.	thenewguy	nobody	"It would be helpful when some (maybe all?) tests failed their assert methods wrote the relevant data to a file unique to the call.

For example, something like this:



{{{
======================================================================
FAIL: test_admin_index (integration.tests.test_known_url_response.KnownUrlResponseTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/vagrant/integration/tests/test_known_url_response.py"", line 24, in test_admin_index
    self.assertContains(response, 'Welcome, Fanny')
  File ""/home/vagrant/.tox/py36/lib/python3.6/site-packages/django/test/testcases.py"", line 454, in assertContains
    self.assertTrue(real_count != 0, msg_prefix + ""Couldn't find %s in response"" % text_repr)
AssertionError: False is not true : Couldn't find 'Welcome, Fanny' in response

}}}

It is helpful to know that the test failed, but it isn't easy to fix the test because the response html isn't available.  Since it is too much to display in the console, it would be helpful if the assertContains() method logged the response content and failure message to a file and then reported the file path in the error message.  Something like... for more details view this file: /path/to/failed-test-uuid.log

Then it would be easy to fix without requiring any adjustments to the test output and running the test suite again.
"	New feature	closed	Testing framework	3.0	Normal	wontfix			Unreviewed	0	0	0	0	0	0
