From 99021c12269d1d83b0aa92b4eab9dd12877bb6ca Mon Sep 17 00:00:00 2001 From: Dave Hunt Date: Fri, 11 Aug 2017 14:20:13 +0100 Subject: [PATCH 1/3] Heracules bravely decapitated the many heads of Hydra! This change runs headless Firefox instances in parallel. Hydra had lots of heads running in parallel. Heracules made Hydra headless. Forgive me. --- .travis.yml | 2 +- tests/webserver.py | 2 +- tox.ini | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e7461e6..1771ebb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ _aliases: paths: - results - &nightly - env: FIREFOX=nightly + env: FIREFOX=nightly PYTEST_ADDOPTS=-n=auto addons: <<: *artifacts firefox: latest-nightly diff --git a/tests/webserver.py b/tests/webserver.py index 130d52f8..b1fc5e4e 100644 --- a/tests/webserver.py +++ b/tests/webserver.py @@ -30,7 +30,7 @@ def translate_path(self, path): class WebServer(object): """Web server for serving local files within the /web directory.""" - def __init__(self, host='', port=8000): + def __init__(self, host='', port=0): """Set up web server. Args: diff --git a/tox.ini b/tox.ini index 74dfee02..36468a33 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = py{27,36}, flake8, docs [testenv] recreate = True -passenv = DISPLAY MOZ_HEADLESS TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH +passenv = DISPLAY MOZ_HEADLESS PYTEST_ADDOPTS TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH deps = pipenv commands = pipenv install --dev --skip-lock From b337bb5e280ea8ab1b4f9a2afebffe194bdae4cd Mon Sep 17 00:00:00 2001 From: Dave Hunt Date: Fri, 26 Jan 2018 22:12:02 +0000 Subject: [PATCH 2/3] Limit to 8 parallel processes --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1771ebb8..70b3b03d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ _aliases: paths: - results - &nightly - env: FIREFOX=nightly PYTEST_ADDOPTS=-n=auto + env: FIREFOX=nightly PYTEST_ADDOPTS=-n=8 addons: <<: *artifacts firefox: latest-nightly From 33fdde34c5e408caff2d505df0fc3b93e8f4f780 Mon Sep 17 00:00:00 2001 From: Dave Hunt Date: Mon, 26 Mar 2018 17:34:11 +0100 Subject: [PATCH 3/3] fixup! Heracules bravely decapitated the many heads of Hydra! --- Pipfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Pipfile b/Pipfile index 13253905..0a0786f4 100644 --- a/Pipfile +++ b/Pipfile @@ -1,17 +1,12 @@ [[source]] - url = "https://pypi.python.org/simple" verify_ssl = true name = "pypi" - [packages] - selenium = "==3.11.0" - [dev-packages] - coveralls = "==1.3.0" flake8 = "==3.5.0" flake8-docstrings = "==1.3.0" @@ -19,3 +14,4 @@ flake8-isort = "==2.5" pytest = "==3.5.0" pytest-cov = "==2.5.1" pytest-selenium = "==1.12.0" +pytest-xdist = "==1.22.2"