From 3ed405f22ff105b75910e4ff6a249b843df5d117 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 10 Aug 2017 21:51:30 -0300 Subject: [PATCH] Add docstring for worker_id Fix #190 --- xdist/plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xdist/plugin.py b/xdist/plugin.py index 17c9e19..93231e8 100644 --- a/xdist/plugin.py +++ b/xdist/plugin.py @@ -124,6 +124,9 @@ def pytest_cmdline_main(config): @pytest.fixture(scope="session") def worker_id(request): + """Return the id of the current worker ('gw0', 'gw1', etc) or 'master' + if running on the master node. + """ if hasattr(request.config, 'slaveinput'): return request.config.slaveinput['slaveid'] else: