trial aborts abnormally if it encounters a TestCase.run which raises an exception
Open
Nobody has claimed this yet.
bug
new
priority-normal
trial
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @exarkun reported | |
|---|---|
| Trac ID | trac#2392 |
| Type | defect |
| Created | 2007-01-11 19:37:10Z |
For example:
test_simple_flat_one ... [OK]
Traceback (most recent call last):
File "/home/exarkun/Projects/Twisted/trunk/bin/trial", line 24, in ?
run()
File "/home/exarkun/Projects/Twisted/trunk/twisted/scripts/trial.py", line 345, in run
test_result = trialRunner.run(suite)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 794, in run
suite.run(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 285, in run
TestSuite.run(self, result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 149, in run
test(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 138, in __call__
return self.run(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 176, in run
super(LoggedSuite, self).run(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 149, in run
test(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 138, in __call__
return self.run(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 149, in run
test(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 138, in __call__
return self.run(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 149, in run
test(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 138, in __call__
return self.run(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 149, in run
test(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 138, in __call__
return self.run(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/runner.py", line 149, in run
test(result)
File "/home/exarkun/Projects/Twisted/trunk/twisted/trial/unittest.py", line 537, in __call__
return self.run(*args, **kwargs)
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/test/test_javascript.py", line 83, in run
script = self.makeScript(self.testMethod())
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/test/test_javascript.py", line 59, in makeScript
scriptFile = self._writeToTemp(consolejstest.generateTestScript(jsfile))
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/scripts/consolejstest.py", line 98, in generateTestScript
dependencies= getDependencies(fname)
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/scripts/consolejstest.py", line 52, in getDependencies
return (bootstrapModules +
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/athena.py", line 200, in allDependencies
return dependencyOrdered(mods)
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/athena.py", line 134, in dependencyOrdered
_insertDep(dependent, ordered)
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/athena.py", line 124, in _insertDep
for dependency in dependent.dependencies():
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/athena.py", line 192, in dependencies
return self._cache.load()
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/util.py", line 228, in load
self._cachedObj = self.loader(self.path, *args, **kwargs)
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/athena.py", line 185, in _getDeps
return self.packageDeps + dict.fromkeys(depgen).keys()
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/athena.py", line 176, in _extractImports
yield self.getOrCreate(m.group(1).decode('ascii'), self.mapping)
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/athena.py", line 152, in getOrCreate
mod = cls._modules[name] = cls(name, mapping)
File "/home/exarkun/Projects/Divmod/trunk/Nevow/nevow/athena.py", line 165, in __init__
self._cache = CachedFile(self.mapping[self.name], self._getDeps)
KeyError: u'Divmod.UnitTest'
exarkun@charm:/tmp$
Searchable metadata
trac-id__2392 2392
type__defect defect
reporter__exarkun exarkun
priority__normal normal
milestone__
branch__
branch_author__
status__new new
resolution__
component__trial trial
keywords__
time__1168544230000000 1168544230000000
changetime__1170555067000000 1170555067000000
version__None None
owner__
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
The failure path is shown through twisted/trial/runner.py and twisted/trial/unittest.py, invoked by bin/trial; start by tracing how TestCase.run exceptions reach the result. Reproduce with a TestCase.run that raises, then verify trial records the exception and completes with a failure result instead of aborting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100