diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2015-09-08 21:54:02 +0100 |
---|---|---|
committer | Stephen Finucane <stephen.finucane@intel.com> | 2015-11-05 04:22:55 +0000 |
commit | e5488850ea68d8b6de742e7c643fe35ef68a11d8 (patch) | |
tree | 96932cb5e73162bb8983d9655c53a5cc87c8e125 | |
parent | 59ca811755f56df329b5dbb73fc5c452fb94821c (diff) | |
download | patchwork-e5488850ea68d8b6de742e7c643fe35ef68a11d8.tar patchwork-e5488850ea68d8b6de742e7c643fe35ef68a11d8.tar.gz |
tests: Add a way for the user to skip selenium tests
It's a bit more convoluted to setup the test environment to work with
selenium (eg. needs a browser installed and Xorg running, ...). It's
possible someone would want to skip those.
v2: Use 'PW' prefix rather than 'PATCHWORK', per existing test
parameters, and pass said variable through tox
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
-rw-r--r-- | patchwork/tests/browser.py | 4 | ||||
-rw-r--r-- | tox.ini | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/patchwork/tests/browser.py b/patchwork/tests/browser.py index 1845000..80285db 100644 --- a/patchwork/tests/browser.py +++ b/patchwork/tests/browser.py @@ -99,6 +99,10 @@ class SeleniumTestCase(StaticLiveServerTestCase): _SCREENSHOT_DIR = os.path.dirname(__file__) + '/../../selenium_screenshots' def setUp(self): + self.skip = os.getenv('PW_SKIP_BROWSER_TESTS', None) + if self.skip: + self.skipTest('Disabled by environment variable') + super(SeleniumTestCase, self).setUp() self.browser = os.getenv('SELENIUM_BROWSER', 'chrome') @@ -19,7 +19,7 @@ commands = passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PW_TEST_DB_USER PW_TEST_DB_PASS - DISPLAY SELENIUM_BROWSER + DISPLAY SELENIUM_BROWSER PW_SKIP_BROWSER_TESTS [testenv:pep8] basepython = python2.7 |