Bug 1280573 - Add testing/mozbase to flake8 linter: r?ahal draft
authorFrancesco Pischedda <francesco.pischedda@gmail.com>
Fri, 30 Sep 2016 15:21:26 +0200
changeset 419509 ee660a8a3a19
parent 419508 be107aa48709
child 419510 3994749e3331
push id30947
push userbmo:francesco.pischedda@gmail.com
push dateFri, 30 Sep 2016 14:09:10 +0000
reviewersahal
bugs1280573, 315963
milestone52.0a1
Bug 1280573 - Add testing/mozbase to flake8 linter: r?ahal merged with changset 315963:5ffed033557e MozReview-Commit-ID: 5GjutSN5U8q
testing/mozbase/mozlog/mozlog/formatters/tbplformatter.py
--- a/testing/mozbase/mozlog/mozlog/formatters/tbplformatter.py
+++ b/testing/mozbase/mozlog/mozlog/formatters/tbplformatter.py
@@ -186,22 +186,21 @@ class TbplFormatter(BaseFormatter):
                 message += "\n%s" % data["stack"]
             if message and message[-1] == "\n":
                 message = message[:-1]
 
             extra = data.get("extra", {})
             if "reftest_screenshots" in extra:
                 screenshots = extra["reftest_screenshots"]
                 if len(screenshots) == 3:
-                    message += ("\nREFTEST   IMAGE 1 (TEST): %s\n"
-                                "REFTEST   IMAGE 2 (REFERENCE): %s") % (
-                                    screenshots[0]["screenshot"],
-                                    screenshots[2]["screenshot"])
+                     message += ("\nREFTEST   IMAGE 1 (TEST): data:image/png;base64,%s\n"
+                                 "REFTEST   IMAGE 2 (REFERENCE): data:image/png;base64,%s") % (screenshots[0]["screenshot"],
+                                                                         screenshots[2]["screenshot"])
                 elif len(screenshots) == 1:
-                    message += "\nREFTEST   IMAGE: %(image1)s" % screenshots[0]["screenshot"]
+                    message += "\nREFTEST   IMAGE: data:image/png;base64,%(image1)s" % screenshots[0]["screenshot"]
 
             failure_line = "TEST-UNEXPECTED-%s | %s | %s\n" % (
             data["status"], test_id, message)
 
             if data["expected"] not in ("PASS", "OK"):
                 expected_msg = "expected %s | " % data["expected"]
             else:
                 expected_msg = ""