Bug 1375145 - Make xdist hook optional in pytest-mozlog, r=davehunt

MozReview-Commit-ID: 6wVUi9XoLZX

--HG--
extra : rebase_source : cf43a64a98f2cc961918b3666900a4e228b953e7
This commit is contained in:
James Graham 2017-06-21 18:07:27 +01:00
Родитель bd8dfcf6a3
Коммит 3a7558d388
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -5,6 +5,7 @@
import mozlog
import time
import pytest
def pytest_addoption(parser):
# We can't simply use mozlog.commandline.add_logging_group(parser) here because
@ -61,6 +62,7 @@ class MozLog(object):
'''Called after test collection is completed, just before tests are run (suite start)'''
self._log_suite_start([item.nodeid for item in session.items])
@pytest.mark.optionalhook
def pytest_xdist_node_collection_finished(self, node, ids):
'''Called after each pytest-xdist node collection is completed'''
self._log_suite_start(ids)