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

Unified Diff: chrome/test/webdriver/run_webdriver_tests.py

Issue 6694007: Small test and ChromeDriver fixes to enable additional tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Dennis' comments Created 9 years, 9 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
« no previous file with comments | « chrome/test/webdriver/commands/webelement_commands.cc ('k') | chrome/test/webdriver/session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/run_webdriver_tests.py
diff --git a/chrome/test/webdriver/run_webdriver_tests.py b/chrome/test/webdriver/run_webdriver_tests.py
index 527846aa0d1cc1f63e35edb0c3765fb5187c10a3..591168ce62a867a85d0b2c781707439fda43999b 100644
--- a/chrome/test/webdriver/run_webdriver_tests.py
+++ b/chrome/test/webdriver/run_webdriver_tests.py
@@ -243,8 +243,26 @@ class Main(object):
logging.debug('Excluded %d test(s): %s' % (len(excluded), excluded))
return args
+ def _FakePytestHack(self):
+ """Adds a fake 'pytest' module to the system modules.
+
+ A single test in text_handling_tests.py depends on the pytest module for
+ its test skipping capabilities. Without pytest, we can not run any tests
+ in the text_handling_tests.py module.
+
+ We are not sure we want to add pytest to chrome's third party dependencies,
+ so for now create a fake pytest module so that we can at least import and
+ run all the tests that do not depend on it. Those depending on it are
+ disabled.
+ """
+ import imp
+ sys.modules['pytest'] = imp.new_module('pytest')
+
def _Run(self):
"""Run the tests."""
+ # TODO(kkania): Remove this hack.
+ self._FakePytestHack()
+
test_names = self._GetTestNames(self._args)
# The tests expect to run with preset 'driver' and 'webserver' class
« no previous file with comments | « chrome/test/webdriver/commands/webelement_commands.cc ('k') | chrome/test/webdriver/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698