Supress autopilot internal functions in test tracebacks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Tests often fail with a traceback that looks like this:
---
Traceback (most recent call last):
File "/home/
super(TestSimpl
File "/home/
self.launch_
File "/home/
emulator_
File "/usr/lib/
emulator_
File "/usr/lib/
process
File "/usr/lib/
object_path
File "/usr/lib/
object_path
File "/usr/lib/
valid_connections = filter(filter_fn, connections)
File "/usr/lib/
success = _connection_
File "/usr/lib/
eligible_pids = [pid] + _get_child_
File "/usr/lib/
p.pid for p in psutil.
File "/usr/lib/
raise NoSuchProcess(pid, None, 'no process found with pid %s' % pid)
NoSuchProcess: no process found with pid 3968
---
But most of the lines in that traceback aren't useful to the test author. Instead, we should investigate whether we can do something like this:
---
Traceback (most recent call last):
File "/home/
super(TestSimpl
File "/home/
self.launch_
File "/home/
emulator_
File "/usr/lib/
emulator_
File "/usr/lib/
raise NoSuchProcess(pid, None, 'no process found with pid %s' % pid)
NoSuchProcess: no process found with pid 3968
---
We can probably do this by setting '__unittest = True' in internal modules. We need to do this carefully though, since we still want to show enough information to debug the problem...