mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
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:
parent
bd8dfcf6a3
commit
3a7558d388
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user