Trial's grouping of failed tests with stack traces is confusing and ambiguous
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @jml reported | |
|---|---|
| Trac ID | trac#7935 |
| Type | defect |
| Created | 2015-06-11 11:15:42Z |
I recently ran a large test suite and at the end of the run got these failures.
flocker.control.test.test_httpapi.MemoryTestsUpdatePrimaryDataset.test_unknown_primary_node
flocker.control.test.test_httpapi.RealTestsUpdatePrimaryDataset.test_unknown_primary_node
===============================================================================
[ERROR]
Traceback (most recent call last):
File "/vagrant/.env/lib/python2.7/site-packages/twisted/internet/defer.py", line 140, in maybeDeferred
result = f(*args, **kw)
… traceback elided …
File "/vagrant/.env/lib/python2.7/site-packages/twisted/trial/_synctest.py", line 447, in assertEqual
% (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = {'line': 'mkdir: cannot create directory \xe2\x80\x98/.virtualenvs\xe2\x80\x99: Permission denied'}
b = {'line': 'test_ssh_conch:test_run_logs_stderr'}
flocker.provision.test.test_ssh_conch.Tests.test_run_logs_stderr
===============================================================================
[ERROR]
Traceback (most recent call last):
File "/vagrant/.env/lib/python2.7/site-packages/twisted/internet/defer.py", line 140, in maybeDeferred
result = f(*args, **kw)
… traceback elided …
File "/vagrant/.env/lib/python2.7/site-packages/twisted/trial/_synctest.py", line 447, in assertEqual
% (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = {'line': 'mkdir: cannot create directory \xe2\x80\x98/.virtualenvs\xe2\x80\x99: Permission denied'}
b = {'line': 'test_ssh_conch:test_run_logs_stdout'}
flocker.provision.test.test_ssh_conch.Tests.test_run_logs_stdout
-------------------------------------------------------------------------------
Ran 208 tests in 7.910s
I assumed that the test names at the top (flocker.control.test.test_httpapi.MemoryTestsUpdatePrimaryDataset.test_unknown_primary_node and so forth) were the cause of the errors, perhaps because the long double underline reminded me of the ReST heading syntax, and because I assume that the traceback is one of the details about the failing test.
This might be subjective. Perhaps the best way of fixing it is to provide an alternative formatter.
Searchable metadata
trac-id__7935 7935
type__defect defect
reporter__jml jml
priority__normal normal
milestone__
branch__
branch_author__
status__new new
resolution__None None
component__trial trial
keywords__
time__1434021342040445 1434021342040445
changetime__1434021342113465 1434021342113465
version__None None
owner__None None
cc__jml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the large test-suite output shown in the report and read how Twisted Trial groups failed test names, tracebacks, and error details. Define a formatter or presentation change that makes each failure and its traceback unambiguous, then verify the output against the reported examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100