We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Getting error when  write a unit test using PyTest for a celery task -> pytest.PytestUnknownMarkWarning: Unknown pytest.mark.celery
I wrote the following bare minimum unit test class for celery

```python
import pytest


@pytest.fixture
def celery_config():
    return {
        "broker_url": "redis://localhost:6379/0",
        "result_backend": "redis://localhost:6379/0"
    }


@pytest.mark.celery(result_backend="redis://")
class GetHash:

    def test_some(self):
        pass
```

I am getting the following error when executing the test
```
test_get_hash.py:12: in <module>
    @pytest.mark.celery(result_backend="redis://")
/home/work/.virtualenvs/dev_env/lib/python3.6/site-packages/_pytest/mark/structures.py:324: in __getattr__
    PytestUnknownMarkWarning,
E   pytest.PytestUnknownMarkWarning: Unknown pytest.mark.celery - is this a typo?
```

These are the items in the `_mark` set `structures.py` file 
```python
<class 'set'>: {
    'tryfirst', 
    'skip',
     'black',
     'filterwarnings',
     'parametrize',
     'usefixtures',
     'skipif',
     'xfail',
     'no_cover',
     'trylast'
}
```

These are the installed python libraries 
```
amqp==2.5.1
anyjson==0.3.3
apipkg==1.5
appdirs==1.4.3
atomicwrites==1.3.0
attrs==19.1.0
autoflake==1.3
Babel==2.7.0
bandit==1.6.2
billiard==3.6.1.0
black==19.3b0
celery==4.3.0
Cerberus==1.3.1
certifi==2019.6.16
chardet==3.0.4
checksumdir==1.1.6
Click==7.0
coverage==4.5.3
execnet==1.6.0
Flask==1.0.2
Flask-Cors==3.0.8
flower==0.9.3
gitdb2==2.0.5
GitPython==2.1.13
idna==2.8
importlib-metadata==0.19
isort==4.3.20
itsdangerous==1.1.0
Jinja2==2.10.1
kombu==4.6.4
MarkupSafe==1.1.1
mock==3.0.5
more-itertools==7.0.0
mysql-connector-python==8.0.16
Nuitka==0.6.5
packaging==19.1
pbr==5.4.2
pluggy==0.12.0
protobuf==3.7.1
py==1.8.0
pyflakes==2.1.1
pyparsing==2.4.2
pytest==5.1.1
pytest-black==0.3.7
pytest-cov==2.7.1
pytest-forked==1.0.2
pytest-runner==5.1
pytest-xdist==1.29.0
python-dateutil==2.8.0
python-dotenv==0.10.1
pytz==2019.2
PyYAML==5.1.2
redis==3.3.8
requests==2.22.0
rq==1.1.0
six==1.12.0
smmap2==2.0.5
SQLAlchemy==1.3.3
stevedore==1.30.1
toml==0.10.0
tornado==5.1.1
urllib3==1.25.3
vine==1.3.0
wcwidth==0.1.7
Werkzeug==0.15.2

```
Is the documentation missing an additional package?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `celery/contrib/pytest.py`
Content:
```
1 """Fixtures and testing utilities for :pypi:`py.test <pytest>`."""
2 from __future__ import absolute_import, unicode_literals
3 
4 import os
5 from contextlib import contextmanager
6 
7 import pytest
8 
9 from .testing import worker
10 from .testing.app import TestApp, setup_default_app
11 
12 NO_WORKER = os.environ.get('NO_WORKER')
13 
14 # pylint: disable=redefined-outer-name
15 # Well, they're called fixtures....
16 
17 
18 @contextmanager
19 def _create_app(enable_logging=False,
20                 use_trap=False,
21                 parameters=None,
22                 **config):
23     # type: (Any, **Any) -> Celery
24     """Utility context used to setup Celery app for pytest fixtures."""
25     parameters = {} if not parameters else parameters
26     test_app = TestApp(
27         set_as_current=False,
28         enable_logging=enable_logging,
29         config=config,
30         **parameters
31     )
32     with setup_default_app(test_app, use_trap=use_trap):
33         yield test_app
34 
35 
36 @pytest.fixture(scope='session')
37 def use_celery_app_trap():
38     # type: () -> bool
39     """You can override this fixture to enable the app trap.
40 
41     The app trap raises an exception whenever something attempts
42     to use the current or default apps.
43     """
44     return False
45 
46 
47 @pytest.fixture(scope='session')
48 def celery_session_app(request,
49                        celery_config,
50                        celery_parameters,
51                        celery_enable_logging,
52                        use_celery_app_trap):
53     # type: (Any) -> Celery
54     """Session Fixture: Return app for session fixtures."""
55     mark = request.node.get_closest_marker('celery')
56     config = dict(celery_config, **mark.kwargs if mark else {})
57     with _create_app(enable_logging=celery_enable_logging,
58                      use_trap=use_celery_app_trap,
59                      parameters=celery_parameters,
60                      **config) as app:
61         if not use_celery_app_trap:
62             app.set_default()
63             app.set_current()
64         yield app
65 
66 
67 @pytest.fixture(scope='session')
68 def celery_session_worker(request,
69                           celery_session_app,
70                           celery_includes,
71                           celery_worker_pool,
72                           celery_worker_parameters):
73     # type: (Any, Celery, Sequence[str], str) -> WorkController
74     """Session Fixture: Start worker that lives throughout test suite."""
75     if not NO_WORKER:
76         for module in celery_includes:
77             celery_session_app.loader.import_task_module(module)
78         with worker.start_worker(celery_session_app,
79                                  pool=celery_worker_pool,
80                                  **celery_worker_parameters) as w:
81             yield w
82 
83 
84 @pytest.fixture(scope='session')
85 def celery_enable_logging():
86     # type: () -> bool
87     """You can override this fixture to enable logging."""
88     return False
89 
90 
91 @pytest.fixture(scope='session')
92 def celery_includes():
93     # type: () -> Sequence[str]
94     """You can override this include modules when a worker start.
95 
96     You can have this return a list of module names to import,
97     these can be task modules, modules registering signals, and so on.
98     """
99     return ()
100 
101 
102 @pytest.fixture(scope='session')
103 def celery_worker_pool():
104     # type: () -> Union[str, Any]
105     """You can override this fixture to set the worker pool.
106 
107     The "solo" pool is used by default, but you can set this to
108     return e.g. "prefork".
109     """
110     return 'solo'
111 
112 
113 @pytest.fixture(scope='session')
114 def celery_config():
115     # type: () -> Mapping[str, Any]
116     """Redefine this fixture to configure the test Celery app.
117 
118     The config returned by your fixture will then be used
119     to configure the :func:`celery_app` fixture.
120     """
121     return {}
122 
123 
124 @pytest.fixture(scope='session')
125 def celery_parameters():
126     # type: () -> Mapping[str, Any]
127     """Redefine this fixture to change the init parameters of test Celery app.
128 
129     The dict returned by your fixture will then be used
130     as parameters when instantiating :class:`~celery.Celery`.
131     """
132     return {}
133 
134 
135 @pytest.fixture(scope='session')
136 def celery_worker_parameters():
137     # type: () -> Mapping[str, Any]
138     """Redefine this fixture to change the init parameters of Celery workers.
139 
140     This can be used e. g. to define queues the worker will consume tasks from.
141 
142     The dict returned by your fixture will then be used
143     as parameters when instantiating :class:`~celery.worker.WorkController`.
144     """
145     return {}
146 
147 
148 @pytest.fixture()
149 def celery_app(request,
150                celery_config,
151                celery_parameters,
152                celery_enable_logging,
153                use_celery_app_trap):
154     """Fixture creating a Celery application instance."""
155     mark = request.node.get_closest_marker('celery')
156     config = dict(celery_config, **mark.kwargs if mark else {})
157     with _create_app(enable_logging=celery_enable_logging,
158                      use_trap=use_celery_app_trap,
159                      parameters=celery_parameters,
160                      **config) as app:
161         yield app
162 
163 
164 @pytest.fixture()
165 def celery_worker(request,
166                   celery_app,
167                   celery_includes,
168                   celery_worker_pool,
169                   celery_worker_parameters):
170     # type: (Any, Celery, Sequence[str], str) -> WorkController
171     """Fixture: Start worker in a thread, stop it when the test returns."""
172     if not NO_WORKER:
173         for module in celery_includes:
174             celery_app.loader.import_task_module(module)
175         with worker.start_worker(celery_app,
176                                  pool=celery_worker_pool,
177                                  **celery_worker_parameters) as w:
178             yield w
179 
180 
181 @pytest.fixture()
182 def depends_on_current_app(celery_app):
183     """Fixture that sets app as current."""
184     celery_app.set_current()
185
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/celery/contrib/pytest.py b/celery/contrib/pytest.py
--- a/celery/contrib/pytest.py
+++ b/celery/contrib/pytest.py
@@ -15,6 +15,16 @@
 # Well, they're called fixtures....
 
 
+def pytest_configure(config):
+    """Register additional pytest configuration."""
+    # add the pytest.mark.celery() marker registration to the pytest.ini [markers] section
+    # this prevents pytest 4.5 and newer from issueing a warning about an unknown marker
+    # and shows helpful marker documentation when running pytest --markers.
+    config.addinivalue_line(
+        "markers", "celery(**overrides): override celery configuration for a test case"
+    )
+
+
 @contextmanager
 def _create_app(enable_logging=False,
                 use_trap=False,

{"golden_diff": "diff --git a/celery/contrib/pytest.py b/celery/contrib/pytest.py\n--- a/celery/contrib/pytest.py\n+++ b/celery/contrib/pytest.py\n@@ -15,6 +15,16 @@\n # Well, they're called fixtures....\n \n \n+def pytest_configure(config):\n+    \"\"\"Register additional pytest configuration.\"\"\"\n+    # add the pytest.mark.celery() marker registration to the pytest.ini [markers] section\n+    # this prevents pytest 4.5 and newer from issueing a warning about an unknown marker\n+    # and shows helpful marker documentation when running pytest --markers.\n+    config.addinivalue_line(\n+        \"markers\", \"celery(**overrides): override celery configuration for a test case\"\n+    )\n+\n+\n @contextmanager\n def _create_app(enable_logging=False,\n                 use_trap=False,\n", "issue": "Getting error when  write a unit test using PyTest for a celery task -> pytest.PytestUnknownMarkWarning: Unknown pytest.mark.celery\nI wrote the following bare minimum unit test class for celery\r\n\r\n```python\r\nimport pytest\r\n\r\n\r\n@pytest.fixture\r\ndef celery_config():\r\n    return {\r\n        \"broker_url\": \"redis://localhost:6379/0\",\r\n        \"result_backend\": \"redis://localhost:6379/0\"\r\n    }\r\n\r\n\r\n@pytest.mark.celery(result_backend=\"redis://\")\r\nclass GetHash:\r\n\r\n    def test_some(self):\r\n        pass\r\n```\r\n\r\nI am getting the following error when executing the test\r\n```\r\ntest_get_hash.py:12: in <module>\r\n    @pytest.mark.celery(result_backend=\"redis://\")\r\n/home/work/.virtualenvs/dev_env/lib/python3.6/site-packages/_pytest/mark/structures.py:324: in __getattr__\r\n    PytestUnknownMarkWarning,\r\nE   pytest.PytestUnknownMarkWarning: Unknown pytest.mark.celery - is this a typo?\r\n```\r\n\r\nThese are the items in the `_mark` set `structures.py` file \r\n```python\r\n<class 'set'>: {\r\n    'tryfirst', \r\n    'skip',\r\n     'black',\r\n     'filterwarnings',\r\n     'parametrize',\r\n     'usefixtures',\r\n     'skipif',\r\n     'xfail',\r\n     'no_cover',\r\n     'trylast'\r\n}\r\n```\r\n\r\nThese are the installed python libraries \r\n```\r\namqp==2.5.1\r\nanyjson==0.3.3\r\napipkg==1.5\r\nappdirs==1.4.3\r\natomicwrites==1.3.0\r\nattrs==19.1.0\r\nautoflake==1.3\r\nBabel==2.7.0\r\nbandit==1.6.2\r\nbilliard==3.6.1.0\r\nblack==19.3b0\r\ncelery==4.3.0\r\nCerberus==1.3.1\r\ncertifi==2019.6.16\r\nchardet==3.0.4\r\nchecksumdir==1.1.6\r\nClick==7.0\r\ncoverage==4.5.3\r\nexecnet==1.6.0\r\nFlask==1.0.2\r\nFlask-Cors==3.0.8\r\nflower==0.9.3\r\ngitdb2==2.0.5\r\nGitPython==2.1.13\r\nidna==2.8\r\nimportlib-metadata==0.19\r\nisort==4.3.20\r\nitsdangerous==1.1.0\r\nJinja2==2.10.1\r\nkombu==4.6.4\r\nMarkupSafe==1.1.1\r\nmock==3.0.5\r\nmore-itertools==7.0.0\r\nmysql-connector-python==8.0.16\r\nNuitka==0.6.5\r\npackaging==19.1\r\npbr==5.4.2\r\npluggy==0.12.0\r\nprotobuf==3.7.1\r\npy==1.8.0\r\npyflakes==2.1.1\r\npyparsing==2.4.2\r\npytest==5.1.1\r\npytest-black==0.3.7\r\npytest-cov==2.7.1\r\npytest-forked==1.0.2\r\npytest-runner==5.1\r\npytest-xdist==1.29.0\r\npython-dateutil==2.8.0\r\npython-dotenv==0.10.1\r\npytz==2019.2\r\nPyYAML==5.1.2\r\nredis==3.3.8\r\nrequests==2.22.0\r\nrq==1.1.0\r\nsix==1.12.0\r\nsmmap2==2.0.5\r\nSQLAlchemy==1.3.3\r\nstevedore==1.30.1\r\ntoml==0.10.0\r\ntornado==5.1.1\r\nurllib3==1.25.3\r\nvine==1.3.0\r\nwcwidth==0.1.7\r\nWerkzeug==0.15.2\r\n\r\n```\r\nIs the documentation missing an additional package?\n", "before_files": [{"content": "\"\"\"Fixtures and testing utilities for :pypi:`py.test <pytest>`.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\nfrom contextlib import contextmanager\n\nimport pytest\n\nfrom .testing import worker\nfrom .testing.app import TestApp, setup_default_app\n\nNO_WORKER = os.environ.get('NO_WORKER')\n\n# pylint: disable=redefined-outer-name\n# Well, they're called fixtures....\n\n\n@contextmanager\ndef _create_app(enable_logging=False,\n                use_trap=False,\n                parameters=None,\n                **config):\n    # type: (Any, **Any) -> Celery\n    \"\"\"Utility context used to setup Celery app for pytest fixtures.\"\"\"\n    parameters = {} if not parameters else parameters\n    test_app = TestApp(\n        set_as_current=False,\n        enable_logging=enable_logging,\n        config=config,\n        **parameters\n    )\n    with setup_default_app(test_app, use_trap=use_trap):\n        yield test_app\n\n\n@pytest.fixture(scope='session')\ndef use_celery_app_trap():\n    # type: () -> bool\n    \"\"\"You can override this fixture to enable the app trap.\n\n    The app trap raises an exception whenever something attempts\n    to use the current or default apps.\n    \"\"\"\n    return False\n\n\n@pytest.fixture(scope='session')\ndef celery_session_app(request,\n                       celery_config,\n                       celery_parameters,\n                       celery_enable_logging,\n                       use_celery_app_trap):\n    # type: (Any) -> Celery\n    \"\"\"Session Fixture: Return app for session fixtures.\"\"\"\n    mark = request.node.get_closest_marker('celery')\n    config = dict(celery_config, **mark.kwargs if mark else {})\n    with _create_app(enable_logging=celery_enable_logging,\n                     use_trap=use_celery_app_trap,\n                     parameters=celery_parameters,\n                     **config) as app:\n        if not use_celery_app_trap:\n            app.set_default()\n            app.set_current()\n        yield app\n\n\n@pytest.fixture(scope='session')\ndef celery_session_worker(request,\n                          celery_session_app,\n                          celery_includes,\n                          celery_worker_pool,\n                          celery_worker_parameters):\n    # type: (Any, Celery, Sequence[str], str) -> WorkController\n    \"\"\"Session Fixture: Start worker that lives throughout test suite.\"\"\"\n    if not NO_WORKER:\n        for module in celery_includes:\n            celery_session_app.loader.import_task_module(module)\n        with worker.start_worker(celery_session_app,\n                                 pool=celery_worker_pool,\n                                 **celery_worker_parameters) as w:\n            yield w\n\n\n@pytest.fixture(scope='session')\ndef celery_enable_logging():\n    # type: () -> bool\n    \"\"\"You can override this fixture to enable logging.\"\"\"\n    return False\n\n\n@pytest.fixture(scope='session')\ndef celery_includes():\n    # type: () -> Sequence[str]\n    \"\"\"You can override this include modules when a worker start.\n\n    You can have this return a list of module names to import,\n    these can be task modules, modules registering signals, and so on.\n    \"\"\"\n    return ()\n\n\n@pytest.fixture(scope='session')\ndef celery_worker_pool():\n    # type: () -> Union[str, Any]\n    \"\"\"You can override this fixture to set the worker pool.\n\n    The \"solo\" pool is used by default, but you can set this to\n    return e.g. \"prefork\".\n    \"\"\"\n    return 'solo'\n\n\n@pytest.fixture(scope='session')\ndef celery_config():\n    # type: () -> Mapping[str, Any]\n    \"\"\"Redefine this fixture to configure the test Celery app.\n\n    The config returned by your fixture will then be used\n    to configure the :func:`celery_app` fixture.\n    \"\"\"\n    return {}\n\n\n@pytest.fixture(scope='session')\ndef celery_parameters():\n    # type: () -> Mapping[str, Any]\n    \"\"\"Redefine this fixture to change the init parameters of test Celery app.\n\n    The dict returned by your fixture will then be used\n    as parameters when instantiating :class:`~celery.Celery`.\n    \"\"\"\n    return {}\n\n\n@pytest.fixture(scope='session')\ndef celery_worker_parameters():\n    # type: () -> Mapping[str, Any]\n    \"\"\"Redefine this fixture to change the init parameters of Celery workers.\n\n    This can be used e. g. to define queues the worker will consume tasks from.\n\n    The dict returned by your fixture will then be used\n    as parameters when instantiating :class:`~celery.worker.WorkController`.\n    \"\"\"\n    return {}\n\n\n@pytest.fixture()\ndef celery_app(request,\n               celery_config,\n               celery_parameters,\n               celery_enable_logging,\n               use_celery_app_trap):\n    \"\"\"Fixture creating a Celery application instance.\"\"\"\n    mark = request.node.get_closest_marker('celery')\n    config = dict(celery_config, **mark.kwargs if mark else {})\n    with _create_app(enable_logging=celery_enable_logging,\n                     use_trap=use_celery_app_trap,\n                     parameters=celery_parameters,\n                     **config) as app:\n        yield app\n\n\n@pytest.fixture()\ndef celery_worker(request,\n                  celery_app,\n                  celery_includes,\n                  celery_worker_pool,\n                  celery_worker_parameters):\n    # type: (Any, Celery, Sequence[str], str) -> WorkController\n    \"\"\"Fixture: Start worker in a thread, stop it when the test returns.\"\"\"\n    if not NO_WORKER:\n        for module in celery_includes:\n            celery_app.loader.import_task_module(module)\n        with worker.start_worker(celery_app,\n                                 pool=celery_worker_pool,\n                                 **celery_worker_parameters) as w:\n            yield w\n\n\n@pytest.fixture()\ndef depends_on_current_app(celery_app):\n    \"\"\"Fixture that sets app as current.\"\"\"\n    celery_app.set_current()\n", "path": "celery/contrib/pytest.py"}], "after_files": [{"content": "\"\"\"Fixtures and testing utilities for :pypi:`py.test <pytest>`.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\nfrom contextlib import contextmanager\n\nimport pytest\n\nfrom .testing import worker\nfrom .testing.app import TestApp, setup_default_app\n\nNO_WORKER = os.environ.get('NO_WORKER')\n\n# pylint: disable=redefined-outer-name\n# Well, they're called fixtures....\n\n\ndef pytest_configure(config):\n    \"\"\"Register additional pytest configuration.\"\"\"\n    # add the pytest.mark.celery() marker registration to the pytest.ini [markers] section\n    # this prevents pytest 4.5 and newer from issueing a warning about an unknown marker\n    # and shows helpful marker documentation when running pytest --markers.\n    config.addinivalue_line(\n        \"markers\", \"celery(**overrides): override celery configuration for a test case\"\n    )\n\n\n@contextmanager\ndef _create_app(enable_logging=False,\n                use_trap=False,\n                parameters=None,\n                **config):\n    # type: (Any, **Any) -> Celery\n    \"\"\"Utility context used to setup Celery app for pytest fixtures.\"\"\"\n    parameters = {} if not parameters else parameters\n    test_app = TestApp(\n        set_as_current=False,\n        enable_logging=enable_logging,\n        config=config,\n        **parameters\n    )\n    with setup_default_app(test_app, use_trap=use_trap):\n        yield test_app\n\n\n@pytest.fixture(scope='session')\ndef use_celery_app_trap():\n    # type: () -> bool\n    \"\"\"You can override this fixture to enable the app trap.\n\n    The app trap raises an exception whenever something attempts\n    to use the current or default apps.\n    \"\"\"\n    return False\n\n\n@pytest.fixture(scope='session')\ndef celery_session_app(request,\n                       celery_config,\n                       celery_parameters,\n                       celery_enable_logging,\n                       use_celery_app_trap):\n    # type: (Any) -> Celery\n    \"\"\"Session Fixture: Return app for session fixtures.\"\"\"\n    mark = request.node.get_closest_marker('celery')\n    config = dict(celery_config, **mark.kwargs if mark else {})\n    with _create_app(enable_logging=celery_enable_logging,\n                     use_trap=use_celery_app_trap,\n                     parameters=celery_parameters,\n                     **config) as app:\n        if not use_celery_app_trap:\n            app.set_default()\n            app.set_current()\n        yield app\n\n\n@pytest.fixture(scope='session')\ndef celery_session_worker(request,\n                          celery_session_app,\n                          celery_includes,\n                          celery_worker_pool,\n                          celery_worker_parameters):\n    # type: (Any, Celery, Sequence[str], str) -> WorkController\n    \"\"\"Session Fixture: Start worker that lives throughout test suite.\"\"\"\n    if not NO_WORKER:\n        for module in celery_includes:\n            celery_session_app.loader.import_task_module(module)\n        with worker.start_worker(celery_session_app,\n                                 pool=celery_worker_pool,\n                                 **celery_worker_parameters) as w:\n            yield w\n\n\n@pytest.fixture(scope='session')\ndef celery_enable_logging():\n    # type: () -> bool\n    \"\"\"You can override this fixture to enable logging.\"\"\"\n    return False\n\n\n@pytest.fixture(scope='session')\ndef celery_includes():\n    # type: () -> Sequence[str]\n    \"\"\"You can override this include modules when a worker start.\n\n    You can have this return a list of module names to import,\n    these can be task modules, modules registering signals, and so on.\n    \"\"\"\n    return ()\n\n\n@pytest.fixture(scope='session')\ndef celery_worker_pool():\n    # type: () -> Union[str, Any]\n    \"\"\"You can override this fixture to set the worker pool.\n\n    The \"solo\" pool is used by default, but you can set this to\n    return e.g. \"prefork\".\n    \"\"\"\n    return 'solo'\n\n\n@pytest.fixture(scope='session')\ndef celery_config():\n    # type: () -> Mapping[str, Any]\n    \"\"\"Redefine this fixture to configure the test Celery app.\n\n    The config returned by your fixture will then be used\n    to configure the :func:`celery_app` fixture.\n    \"\"\"\n    return {}\n\n\n@pytest.fixture(scope='session')\ndef celery_parameters():\n    # type: () -> Mapping[str, Any]\n    \"\"\"Redefine this fixture to change the init parameters of test Celery app.\n\n    The dict returned by your fixture will then be used\n    as parameters when instantiating :class:`~celery.Celery`.\n    \"\"\"\n    return {}\n\n\n@pytest.fixture(scope='session')\ndef celery_worker_parameters():\n    # type: () -> Mapping[str, Any]\n    \"\"\"Redefine this fixture to change the init parameters of Celery workers.\n\n    This can be used e. g. to define queues the worker will consume tasks from.\n\n    The dict returned by your fixture will then be used\n    as parameters when instantiating :class:`~celery.worker.WorkController`.\n    \"\"\"\n    return {}\n\n\n@pytest.fixture()\ndef celery_app(request,\n               celery_config,\n               celery_parameters,\n               celery_enable_logging,\n               use_celery_app_trap):\n    \"\"\"Fixture creating a Celery application instance.\"\"\"\n    mark = request.node.get_closest_marker('celery')\n    config = dict(celery_config, **mark.kwargs if mark else {})\n    with _create_app(enable_logging=celery_enable_logging,\n                     use_trap=use_celery_app_trap,\n                     parameters=celery_parameters,\n                     **config) as app:\n        yield app\n\n\n@pytest.fixture()\ndef celery_worker(request,\n                  celery_app,\n                  celery_includes,\n                  celery_worker_pool,\n                  celery_worker_parameters):\n    # type: (Any, Celery, Sequence[str], str) -> WorkController\n    \"\"\"Fixture: Start worker in a thread, stop it when the test returns.\"\"\"\n    if not NO_WORKER:\n        for module in celery_includes:\n            celery_app.loader.import_task_module(module)\n        with worker.start_worker(celery_app,\n                                 pool=celery_worker_pool,\n                                 **celery_worker_parameters) as w:\n            yield w\n\n\n@pytest.fixture()\ndef depends_on_current_app(celery_app):\n    \"\"\"Fixture that sets app as current.\"\"\"\n    celery_app.set_current()\n", "path": "celery/contrib/pytest.py"}]}