Closed
Bug 1342954
Opened 7 years ago
Closed 7 years ago
Improve handling of ERROR in pytest-mozlog
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(firefox54 fixed)
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: jgraham, Unassigned)
Details
Attachments
(2 files)
59 bytes,
text/x-review-board-request
|
davehunt
:
review+
|
Details |
1.13 KB,
patch
|
Details | Diff | Splinter Review |
The assumption that report.longrepr is a string or a tuple or has a reprcrash attribute is not quite true e.g. sometimes one gets an errorstring attribute. We should handle this better.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8841610 [details] Bug 1342954 - Improve ERROR handling in pytest_mozlog https://reviewboard.mozilla.org/r/115762/#review117174 ::: testing/mozbase/mozlog/mozlog/pytest_mozlog/plugin.py:100 (Diff revision 1) > - # For failures, longrepr is a ReprExceptionInfo > + # For failures, longrepr is a ReprExceptionInfo > - crash = report.longrepr.reprcrash > + crash = longrepr.reprcrash > - message = "{0} (line {1})".format(crash.message, crash.lineno) > + message = "{0} (line {1})".format(crash.message, crash.lineno) > - stack = report.longrepr.reprtraceback > - except AttributeError: > + stack = longrepr.reprtraceback > + elif hasattr(longrepr, "errorstring"): > + message = longrepr.errorstring Here, stack will be None. When longrepr is a string I set stack to match message, but I'm not sure if that's the right thing to do.
Attachment #8841610 -
Flags: review?(dave.hunt) → review+
Comment hidden (mozreview-request) |
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/autoland/rev/1890ccdab48d Improve ERROR handling in pytest_mozlog r=davehunt
Reporter | ||
Updated•7 years ago
|
Attachment #8841971 -
Flags: checked-in+
Reporter | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/86de81c342fd fixup formatting to keep flake8 happy, a=bustage
Keywords: checkin-needed
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1890ccdab48d https://hg.mozilla.org/mozilla-central/rev/86de81c342fd
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in
before you can comment on or make changes to this bug.
Description
•