Cryptic error from subunit when an import fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Testrepository |
High
|
Robert Collins | ||
| testtools |
High
|
Unassigned |
Bug Description
When one of the test module fails to import for whatever reason, the raw subunit stream is output by "setup.py testr", something like:
unning testr
running=
Non-zero exit code (2) from test listing. stdout=
[...]
ume.test_
error: testr failed (3)
Which is not user friendly at all.
Changed in testrepository: | |
assignee: | nobody → Alexei Kornienko (alexei-kornienko) |
status: | New → In Progress |
Changed in testrepository: | |
status: | In Progress → Fix Committed |
assignee: | Alexei Kornienko (alexei-kornienko) → Robert Collins (lifeless) |
Changed in testtools: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in testrepository: | |
importance: | Undecided → High |
Changed in testrepository: | |
status: | Fix Committed → Fix Released |
Alan Pevec (apevec) wrote : | #2 |
Which version of testrepository fixes this?
Does it require unittest fix http://
Jonathan Lange (jml) wrote : | #3 |
According to https:/
I tried running `testr run` on testtools master, first with no modifications and got:
$ testr run
running=
Ran 1196 (+1195) tests in 2.071s
PASSED (id=0, skips=8)
Then with this patch:
$ git di
diff --git a/testtools/
index c53bc9e..2270646 100644
--- a/testtools/
+++ b/testtools/
@@ -1,5 +1,6 @@
# Copyright (c) 2008-2012 testtools developers. See LICENSE for details.
+aouthaosute
import re
from testtools import TestCase
and got:
$ testr run
running=
Traceback (most recent call last):
File "/System/
"__main__", fname, loader, pkg_name)
File "/System/
exec code in run_globals
File "/Users/
main()
File "/Users/
stdout=stdout, exit=False)
File "testtools/run.py", line 171, in __init__
self.
File "/Users/
self.
File "/Users/
self.module)
File "/Users/
suites = [self.loadTests
File "/Users/
test = obj()
File "testtools/
suites = map(lambda x: x.test_suite(), modules)
File "testtools/
suites = map(lambda x: x.test_suite(), modules)
File "testtools/
from testtools.
File "testtools/
aouthaosute
NameError: name 'aouthaosute' is not defined
=======
FAIL: process-returncode
tags: worker-0
-------
returncode 1
Ran 1 (-1195) tests
FAILED (id=1, failures=1 (+1))
And then with this patch:
git di
diff --git a/testtools/
index c53bc9e..5b1304c 100644
--- a/testtools/
+++ b/testtools/
@@ -1,5 +1,6 @@
# Copyright (c) 2008-2012 testtools developers. See LICENSE for details.
+import aouthaosute
import re
from testtools import TestCase
an...
Changed in testtools: | |
status: | Triaged → Invalid |
We need to patch 3 projects to fix this issue: /code.launchpad .net/~alexei- kornienko/ subunit/ bug-1271133 /code.launchpad .net/~alexei- kornienko/ testrepository/ bug-1271133 /github. com/testing- cabal/testtools /pull/77
https:/
https:/
https:/