Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: components/test/data/password_manager/automated_tests/environment.py

Issue 1089383002: [Password manager tests automation] Refactor test_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/test/data/password_manager/automated_tests/environment.py
diff --git a/components/test/data/password_manager/automated_tests/environment.py b/components/test/data/password_manager/automated_tests/environment.py
index 15ee67d0ad904617ba7c025becb739d969856c34..e2a84c12580083c569e6681cc1d5a2e6b03537c3 100644
--- a/components/test/data/password_manager/automated_tests/environment.py
+++ b/components/test/data/password_manager/automated_tests/environment.py
@@ -293,7 +293,12 @@ class Environment:
getattr(websitetest, test_case_name)()
except Exception as e:
successful = False
- error = e.message
+ # httplib.CannotSendRequest doesn't define a message,
+ # so type(e).__name__ will at least log exception name as a reason.
+ # TODO(melandory): logging.exception(e) produces meaningful result
+ # for httplib.CannotSendRequest, so we can try to propagate information
+ # that reason is an exception to the logging phase.
+ error = "Exception %s %s" % (type(e).__name__, e)
self.tests_results.append(
(websitetest.name, test_case_name, successful, error))

Powered by Google App Engine
This is Rietveld 408576698