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

Unified Diff: tools/chrome_proxy/webdriver/common.py

Issue 2559113005: Use python's unittest framework. (Closed)
Patch Set: Explain comment better Created 4 years 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
« no previous file with comments | « no previous file | tools/chrome_proxy/webdriver/simple_smoke.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_proxy/webdriver/common.py
diff --git a/tools/chrome_proxy/webdriver/common.py b/tools/chrome_proxy/webdriver/common.py
index be5ba9d521972ecc956dc31a7f0e5f1c677590d0..d44ceabeae52136d56be5817513bf2804709bd15 100644
--- a/tools/chrome_proxy/webdriver/common.py
+++ b/tools/chrome_proxy/webdriver/common.py
@@ -368,43 +368,3 @@ class HTTPResponse:
def WasXHR(self):
return self.request_type == 'XHR'
-
-class IntegrationTest:
- """A parent class for all integration tests with utility and assertion
- methods.
-
- All methods starting with the word 'test' (ignoring case) will be called with
- the RunAllTests() method which can be used in place of a main method.
- """
- def RunAllTests(self):
- """Runs all methods starting with the word 'test' (ignoring case) in the
- class.
-
- Can be used in place of a main method to run all tests in a class.
- """
- methodList = [method for method in dir(self) if callable(getattr(self,
- method)) and method.lower().startswith('test')]
- for method in methodList:
- try:
- getattr(self, method)()
- except Exception as e:
- # Uses the Exception tuple from sys.exec_info().
- HandleException(method)
-
- # TODO(robertogden): Add some nice assertion functions.
-
- def Fail(self, msg):
- """Called when a test fails an assertion.
-
- Args:
- msg: The string message to print to stderr
- """
- sys.stderr.write("**************************************\n")
- sys.stderr.write("**************************************\n")
- sys.stderr.write("** **\n")
- sys.stderr.write("** TEST FAILURE **\n")
- sys.stderr.write("** **\n")
- sys.stderr.write("**************************************\n")
- sys.stderr.write("**************************************\n")
- sys.stderr.write(msg, '\n')
- sys.exit(1)
« no previous file with comments | « no previous file | tools/chrome_proxy/webdriver/simple_smoke.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698