Skip to content

Commit b15a0af

Browse files
committed
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.
1 parent d9340e9 commit b15a0af

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ _aliases:
99
paths:
1010
- results
1111
- &nightly
12-
env: FIREFOX=nightly
12+
env: FIREFOX=nightly PYTEST_ADDOPTS=-n=auto
1313
addons:
1414
<<: *artifacts
1515
firefox: latest-nightly

requirements/tests.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pytest==3.3.2
22
pytest-selenium==1.11.4
3+
pytest-xdist==1.22.0

tests/webserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def translate_path(self, path):
3030
class WebServer(object):
3131
"""Web server for serving local files within the /web directory."""
3232

33-
def __init__(self, host='', port=8000):
33+
def __init__(self, host='', port=0):
3434
"""Set up web server.
3535
3636
Args:

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ envlist = py{27,36}, flake8, docs
33

44
[testenv]
55
recreate = True
6-
passenv = DISPLAY MOZ_HEADLESS TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
6+
passenv = DISPLAY MOZ_HEADLESS PYTEST_ADDOPTS TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
77
deps = -rrequirements/coverage.txt
88
commands =
99
pytest --driver=Firefox --cov --html=results/{envname}.html {posargs}

0 commit comments

Comments
 (0)