We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Move over to new pytest plugin API
We're currently using `pytest.mark.hookwrapper` in our pytest plugin. According to @RonnyPfannschmidt this API is soon to be deprecated and we should be using ` pytest.hookimpl(hookwrapper=True)` instead.

Hopefully this should be a simple matter of changing the code over to use the new decorator, but it's Hypothesis development so I'm sure something exciting will break. 😆 😢 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `hypothesis-python/src/hypothesis/extra/pytestplugin.py`
Content:
```
1 # coding=utf-8
2 #
3 # This file is part of Hypothesis, which may be found at
4 # https://github.com/HypothesisWorks/hypothesis-python
5 #
6 # Most of this work is copyright (C) 2013-2018 David R. MacIver
7 # (david@drmaciver.com), but it contains contributions by others. See
8 # CONTRIBUTING.rst for a full list of people who may hold copyright, and
9 # consult the git log if you need to determine who owns an individual
10 # contribution.
11 #
12 # This Source Code Form is subject to the terms of the Mozilla Public License,
13 # v. 2.0. If a copy of the MPL was not distributed with this file, You can
14 # obtain one at http://mozilla.org/MPL/2.0/.
15 #
16 # END HEADER
17 
18 from __future__ import absolute_import, division, print_function
19 
20 from distutils.version import LooseVersion
21 
22 import pytest
23 
24 from hypothesis import Verbosity, core, settings
25 from hypothesis._settings import note_deprecation
26 from hypothesis.internal.compat import OrderedDict, text_type
27 from hypothesis.internal.detection import is_hypothesis_test
28 from hypothesis.reporting import default as default_reporter, with_reporter
29 from hypothesis.statistics import collector
30 
31 LOAD_PROFILE_OPTION = "--hypothesis-profile"
32 VERBOSITY_OPTION = "--hypothesis-verbosity"
33 PRINT_STATISTICS_OPTION = "--hypothesis-show-statistics"
34 SEED_OPTION = "--hypothesis-seed"
35 
36 
37 class StoringReporter(object):
38     def __init__(self, config):
39         self.config = config
40         self.results = []
41 
42     def __call__(self, msg):
43         if self.config.getoption("capture", "fd") == "no":
44             default_reporter(msg)
45         if not isinstance(msg, text_type):
46             msg = repr(msg)
47         self.results.append(msg)
48 
49 
50 def pytest_addoption(parser):
51     group = parser.getgroup("hypothesis", "Hypothesis")
52     group.addoption(
53         LOAD_PROFILE_OPTION,
54         action="store",
55         help="Load in a registered hypothesis.settings profile",
56     )
57     group.addoption(
58         VERBOSITY_OPTION,
59         action="store",
60         choices=[opt.name for opt in Verbosity],
61         help="Override profile with verbosity setting specified",
62     )
63     group.addoption(
64         PRINT_STATISTICS_OPTION,
65         action="store_true",
66         help="Configure when statistics are printed",
67         default=False,
68     )
69     group.addoption(
70         SEED_OPTION, action="store", help="Set a seed to use for all Hypothesis tests"
71     )
72 
73 
74 def pytest_report_header(config):
75     profile = config.getoption(LOAD_PROFILE_OPTION)
76     if not profile:
77         profile = settings._current_profile
78     settings_str = settings.get_profile(profile).show_changed()
79     if settings_str != "":
80         settings_str = " -> %s" % (settings_str)
81     return "hypothesis profile %r%s" % (profile, settings_str)
82 
83 
84 def pytest_configure(config):
85     core.running_under_pytest = True
86     profile = config.getoption(LOAD_PROFILE_OPTION)
87     if profile:
88         settings.load_profile(profile)
89     verbosity_name = config.getoption(VERBOSITY_OPTION)
90     if verbosity_name:
91         verbosity_value = Verbosity[verbosity_name]
92         profile_name = "%s-with-%s-verbosity" % (
93             settings._current_profile,
94             verbosity_name,
95         )
96         # register_profile creates a new profile, exactly like the current one,
97         # with the extra values given (in this case 'verbosity')
98         settings.register_profile(profile_name, verbosity=verbosity_value)
99         settings.load_profile(profile_name)
100     seed = config.getoption(SEED_OPTION)
101     if seed is not None:
102         try:
103             seed = int(seed)
104         except ValueError:
105             pass
106         core.global_force_seed = seed
107     config.addinivalue_line("markers", "hypothesis: Tests which use hypothesis.")
108 
109 
110 gathered_statistics = OrderedDict()  # type: dict
111 
112 
113 @pytest.mark.hookwrapper
114 def pytest_runtest_call(item):
115     if not (hasattr(item, "obj") and is_hypothesis_test(item.obj)):
116         yield
117     else:
118         store = StoringReporter(item.config)
119 
120         def note_statistics(stats):
121             lines = [item.nodeid + ":", ""] + stats.get_description() + [""]
122             gathered_statistics[item.nodeid] = lines
123             item.hypothesis_statistics = lines
124 
125         with collector.with_value(note_statistics):
126             with with_reporter(store):
127                 yield
128         if store.results:
129             item.hypothesis_report_information = list(store.results)
130 
131 
132 @pytest.mark.hookwrapper
133 def pytest_runtest_makereport(item, call):
134     report = (yield).get_result()
135     if hasattr(item, "hypothesis_report_information"):
136         report.sections.append(
137             ("Hypothesis", "\n".join(item.hypothesis_report_information))
138         )
139     if hasattr(item, "hypothesis_statistics") and report.when == "teardown":
140         # Running on pytest < 3.5 where user_properties doesn't exist, fall
141         # back on the global gathered_statistics (which breaks under xdist)
142         if hasattr(report, "user_properties"):  # pragma: no branch
143             val = ("hypothesis-stats", item.hypothesis_statistics)
144             # Workaround for https://github.com/pytest-dev/pytest/issues/4034
145             if isinstance(report.user_properties, tuple):
146                 report.user_properties += (val,)
147             else:
148                 report.user_properties.append(val)
149 
150 
151 def pytest_terminal_summary(terminalreporter):
152     if not terminalreporter.config.getoption(PRINT_STATISTICS_OPTION):
153         return
154     terminalreporter.section("Hypothesis Statistics")
155 
156     if LooseVersion(pytest.__version__) < "3.5":  # pragma: no cover
157         if not gathered_statistics:
158             terminalreporter.write_line(
159                 "Reporting Hypothesis statistics with pytest-xdist enabled "
160                 "requires pytest >= 3.5"
161             )
162         for lines in gathered_statistics.values():
163             for li in lines:
164                 terminalreporter.write_line(li)
165         return
166 
167     # terminalreporter.stats is a dict, where the empty string appears to
168     # always be the key for a list of _pytest.reports.TestReport objects
169     # (where we stored the statistics data in pytest_runtest_makereport above)
170     for test_report in terminalreporter.stats.get("", []):
171         for name, lines in test_report.user_properties:
172             if name == "hypothesis-stats" and test_report.when == "teardown":
173                 for li in lines:
174                     terminalreporter.write_line(li)
175 
176 
177 def pytest_collection_modifyitems(items):
178     for item in items:
179         if not isinstance(item, pytest.Function):
180             continue
181         if is_hypothesis_test(item.obj):
182             item.add_marker("hypothesis")
183         if getattr(item.obj, "is_hypothesis_strategy_function", False):
184 
185             def note_strategy_is_not_test(*args, **kwargs):
186                 note_deprecation(
187                     "%s is a function that returns a Hypothesis strategy, "
188                     "but pytest has collected it as a test function.  This "
189                     "is useless as the function body will never be executed."
190                     "To define a test function, use @given instead of "
191                     "@composite." % (item.nodeid,),
192                     since="2018-11-02",
193                 )
194 
195             item.obj = note_strategy_is_not_test
196 
197 
198 def load():
199     pass
200
```
--- 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/hypothesis-python/src/hypothesis/extra/pytestplugin.py b/hypothesis-python/src/hypothesis/extra/pytestplugin.py
--- a/hypothesis-python/src/hypothesis/extra/pytestplugin.py
+++ b/hypothesis-python/src/hypothesis/extra/pytestplugin.py
@@ -110,7 +110,7 @@
 gathered_statistics = OrderedDict()  # type: dict
 
 
-@pytest.mark.hookwrapper
+@pytest.hookimpl(hookwrapper=True)
 def pytest_runtest_call(item):
     if not (hasattr(item, "obj") and is_hypothesis_test(item.obj)):
         yield
@@ -129,7 +129,7 @@
             item.hypothesis_report_information = list(store.results)
 
 
-@pytest.mark.hookwrapper
+@pytest.hookimpl(hookwrapper=True)
 def pytest_runtest_makereport(item, call):
     report = (yield).get_result()
     if hasattr(item, "hypothesis_report_information"):

{"golden_diff": "diff --git a/hypothesis-python/src/hypothesis/extra/pytestplugin.py b/hypothesis-python/src/hypothesis/extra/pytestplugin.py\n--- a/hypothesis-python/src/hypothesis/extra/pytestplugin.py\n+++ b/hypothesis-python/src/hypothesis/extra/pytestplugin.py\n@@ -110,7 +110,7 @@\n gathered_statistics = OrderedDict()  # type: dict\n \n \n-@pytest.mark.hookwrapper\n+@pytest.hookimpl(hookwrapper=True)\n def pytest_runtest_call(item):\n     if not (hasattr(item, \"obj\") and is_hypothesis_test(item.obj)):\n         yield\n@@ -129,7 +129,7 @@\n             item.hypothesis_report_information = list(store.results)\n \n \n-@pytest.mark.hookwrapper\n+@pytest.hookimpl(hookwrapper=True)\n def pytest_runtest_makereport(item, call):\n     report = (yield).get_result()\n     if hasattr(item, \"hypothesis_report_information\"):\n", "issue": "Move over to new pytest plugin API\nWe're currently using `pytest.mark.hookwrapper` in our pytest plugin. According to @RonnyPfannschmidt this API is soon to be deprecated and we should be using ` pytest.hookimpl(hookwrapper=True)` instead.\r\n\r\nHopefully this should be a simple matter of changing the code over to use the new decorator, but it's Hypothesis development so I'm sure something exciting will break. \ud83d\ude06 \ud83d\ude22 \n", "before_files": [{"content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who may hold copyright, and\n# consult the git log if you need to determine who owns an individual\n# contribution.\n#\n# This Source Code Form is subject to the terms of the Mozilla Public License,\n# v. 2.0. If a copy of the MPL was not distributed with this file, You can\n# obtain one at http://mozilla.org/MPL/2.0/.\n#\n# END HEADER\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom distutils.version import LooseVersion\n\nimport pytest\n\nfrom hypothesis import Verbosity, core, settings\nfrom hypothesis._settings import note_deprecation\nfrom hypothesis.internal.compat import OrderedDict, text_type\nfrom hypothesis.internal.detection import is_hypothesis_test\nfrom hypothesis.reporting import default as default_reporter, with_reporter\nfrom hypothesis.statistics import collector\n\nLOAD_PROFILE_OPTION = \"--hypothesis-profile\"\nVERBOSITY_OPTION = \"--hypothesis-verbosity\"\nPRINT_STATISTICS_OPTION = \"--hypothesis-show-statistics\"\nSEED_OPTION = \"--hypothesis-seed\"\n\n\nclass StoringReporter(object):\n    def __init__(self, config):\n        self.config = config\n        self.results = []\n\n    def __call__(self, msg):\n        if self.config.getoption(\"capture\", \"fd\") == \"no\":\n            default_reporter(msg)\n        if not isinstance(msg, text_type):\n            msg = repr(msg)\n        self.results.append(msg)\n\n\ndef pytest_addoption(parser):\n    group = parser.getgroup(\"hypothesis\", \"Hypothesis\")\n    group.addoption(\n        LOAD_PROFILE_OPTION,\n        action=\"store\",\n        help=\"Load in a registered hypothesis.settings profile\",\n    )\n    group.addoption(\n        VERBOSITY_OPTION,\n        action=\"store\",\n        choices=[opt.name for opt in Verbosity],\n        help=\"Override profile with verbosity setting specified\",\n    )\n    group.addoption(\n        PRINT_STATISTICS_OPTION,\n        action=\"store_true\",\n        help=\"Configure when statistics are printed\",\n        default=False,\n    )\n    group.addoption(\n        SEED_OPTION, action=\"store\", help=\"Set a seed to use for all Hypothesis tests\"\n    )\n\n\ndef pytest_report_header(config):\n    profile = config.getoption(LOAD_PROFILE_OPTION)\n    if not profile:\n        profile = settings._current_profile\n    settings_str = settings.get_profile(profile).show_changed()\n    if settings_str != \"\":\n        settings_str = \" -> %s\" % (settings_str)\n    return \"hypothesis profile %r%s\" % (profile, settings_str)\n\n\ndef pytest_configure(config):\n    core.running_under_pytest = True\n    profile = config.getoption(LOAD_PROFILE_OPTION)\n    if profile:\n        settings.load_profile(profile)\n    verbosity_name = config.getoption(VERBOSITY_OPTION)\n    if verbosity_name:\n        verbosity_value = Verbosity[verbosity_name]\n        profile_name = \"%s-with-%s-verbosity\" % (\n            settings._current_profile,\n            verbosity_name,\n        )\n        # register_profile creates a new profile, exactly like the current one,\n        # with the extra values given (in this case 'verbosity')\n        settings.register_profile(profile_name, verbosity=verbosity_value)\n        settings.load_profile(profile_name)\n    seed = config.getoption(SEED_OPTION)\n    if seed is not None:\n        try:\n            seed = int(seed)\n        except ValueError:\n            pass\n        core.global_force_seed = seed\n    config.addinivalue_line(\"markers\", \"hypothesis: Tests which use hypothesis.\")\n\n\ngathered_statistics = OrderedDict()  # type: dict\n\n\n@pytest.mark.hookwrapper\ndef pytest_runtest_call(item):\n    if not (hasattr(item, \"obj\") and is_hypothesis_test(item.obj)):\n        yield\n    else:\n        store = StoringReporter(item.config)\n\n        def note_statistics(stats):\n            lines = [item.nodeid + \":\", \"\"] + stats.get_description() + [\"\"]\n            gathered_statistics[item.nodeid] = lines\n            item.hypothesis_statistics = lines\n\n        with collector.with_value(note_statistics):\n            with with_reporter(store):\n                yield\n        if store.results:\n            item.hypothesis_report_information = list(store.results)\n\n\n@pytest.mark.hookwrapper\ndef pytest_runtest_makereport(item, call):\n    report = (yield).get_result()\n    if hasattr(item, \"hypothesis_report_information\"):\n        report.sections.append(\n            (\"Hypothesis\", \"\\n\".join(item.hypothesis_report_information))\n        )\n    if hasattr(item, \"hypothesis_statistics\") and report.when == \"teardown\":\n        # Running on pytest < 3.5 where user_properties doesn't exist, fall\n        # back on the global gathered_statistics (which breaks under xdist)\n        if hasattr(report, \"user_properties\"):  # pragma: no branch\n            val = (\"hypothesis-stats\", item.hypothesis_statistics)\n            # Workaround for https://github.com/pytest-dev/pytest/issues/4034\n            if isinstance(report.user_properties, tuple):\n                report.user_properties += (val,)\n            else:\n                report.user_properties.append(val)\n\n\ndef pytest_terminal_summary(terminalreporter):\n    if not terminalreporter.config.getoption(PRINT_STATISTICS_OPTION):\n        return\n    terminalreporter.section(\"Hypothesis Statistics\")\n\n    if LooseVersion(pytest.__version__) < \"3.5\":  # pragma: no cover\n        if not gathered_statistics:\n            terminalreporter.write_line(\n                \"Reporting Hypothesis statistics with pytest-xdist enabled \"\n                \"requires pytest >= 3.5\"\n            )\n        for lines in gathered_statistics.values():\n            for li in lines:\n                terminalreporter.write_line(li)\n        return\n\n    # terminalreporter.stats is a dict, where the empty string appears to\n    # always be the key for a list of _pytest.reports.TestReport objects\n    # (where we stored the statistics data in pytest_runtest_makereport above)\n    for test_report in terminalreporter.stats.get(\"\", []):\n        for name, lines in test_report.user_properties:\n            if name == \"hypothesis-stats\" and test_report.when == \"teardown\":\n                for li in lines:\n                    terminalreporter.write_line(li)\n\n\ndef pytest_collection_modifyitems(items):\n    for item in items:\n        if not isinstance(item, pytest.Function):\n            continue\n        if is_hypothesis_test(item.obj):\n            item.add_marker(\"hypothesis\")\n        if getattr(item.obj, \"is_hypothesis_strategy_function\", False):\n\n            def note_strategy_is_not_test(*args, **kwargs):\n                note_deprecation(\n                    \"%s is a function that returns a Hypothesis strategy, \"\n                    \"but pytest has collected it as a test function.  This \"\n                    \"is useless as the function body will never be executed.\"\n                    \"To define a test function, use @given instead of \"\n                    \"@composite.\" % (item.nodeid,),\n                    since=\"2018-11-02\",\n                )\n\n            item.obj = note_strategy_is_not_test\n\n\ndef load():\n    pass\n", "path": "hypothesis-python/src/hypothesis/extra/pytestplugin.py"}], "after_files": [{"content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who may hold copyright, and\n# consult the git log if you need to determine who owns an individual\n# contribution.\n#\n# This Source Code Form is subject to the terms of the Mozilla Public License,\n# v. 2.0. If a copy of the MPL was not distributed with this file, You can\n# obtain one at http://mozilla.org/MPL/2.0/.\n#\n# END HEADER\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom distutils.version import LooseVersion\n\nimport pytest\n\nfrom hypothesis import Verbosity, core, settings\nfrom hypothesis._settings import note_deprecation\nfrom hypothesis.internal.compat import OrderedDict, text_type\nfrom hypothesis.internal.detection import is_hypothesis_test\nfrom hypothesis.reporting import default as default_reporter, with_reporter\nfrom hypothesis.statistics import collector\n\nLOAD_PROFILE_OPTION = \"--hypothesis-profile\"\nVERBOSITY_OPTION = \"--hypothesis-verbosity\"\nPRINT_STATISTICS_OPTION = \"--hypothesis-show-statistics\"\nSEED_OPTION = \"--hypothesis-seed\"\n\n\nclass StoringReporter(object):\n    def __init__(self, config):\n        self.config = config\n        self.results = []\n\n    def __call__(self, msg):\n        if self.config.getoption(\"capture\", \"fd\") == \"no\":\n            default_reporter(msg)\n        if not isinstance(msg, text_type):\n            msg = repr(msg)\n        self.results.append(msg)\n\n\ndef pytest_addoption(parser):\n    group = parser.getgroup(\"hypothesis\", \"Hypothesis\")\n    group.addoption(\n        LOAD_PROFILE_OPTION,\n        action=\"store\",\n        help=\"Load in a registered hypothesis.settings profile\",\n    )\n    group.addoption(\n        VERBOSITY_OPTION,\n        action=\"store\",\n        choices=[opt.name for opt in Verbosity],\n        help=\"Override profile with verbosity setting specified\",\n    )\n    group.addoption(\n        PRINT_STATISTICS_OPTION,\n        action=\"store_true\",\n        help=\"Configure when statistics are printed\",\n        default=False,\n    )\n    group.addoption(\n        SEED_OPTION, action=\"store\", help=\"Set a seed to use for all Hypothesis tests\"\n    )\n\n\ndef pytest_report_header(config):\n    profile = config.getoption(LOAD_PROFILE_OPTION)\n    if not profile:\n        profile = settings._current_profile\n    settings_str = settings.get_profile(profile).show_changed()\n    if settings_str != \"\":\n        settings_str = \" -> %s\" % (settings_str)\n    return \"hypothesis profile %r%s\" % (profile, settings_str)\n\n\ndef pytest_configure(config):\n    core.running_under_pytest = True\n    profile = config.getoption(LOAD_PROFILE_OPTION)\n    if profile:\n        settings.load_profile(profile)\n    verbosity_name = config.getoption(VERBOSITY_OPTION)\n    if verbosity_name:\n        verbosity_value = Verbosity[verbosity_name]\n        profile_name = \"%s-with-%s-verbosity\" % (\n            settings._current_profile,\n            verbosity_name,\n        )\n        # register_profile creates a new profile, exactly like the current one,\n        # with the extra values given (in this case 'verbosity')\n        settings.register_profile(profile_name, verbosity=verbosity_value)\n        settings.load_profile(profile_name)\n    seed = config.getoption(SEED_OPTION)\n    if seed is not None:\n        try:\n            seed = int(seed)\n        except ValueError:\n            pass\n        core.global_force_seed = seed\n    config.addinivalue_line(\"markers\", \"hypothesis: Tests which use hypothesis.\")\n\n\ngathered_statistics = OrderedDict()  # type: dict\n\n\n@pytest.hookimpl(hookwrapper=True)\ndef pytest_runtest_call(item):\n    if not (hasattr(item, \"obj\") and is_hypothesis_test(item.obj)):\n        yield\n    else:\n        store = StoringReporter(item.config)\n\n        def note_statistics(stats):\n            lines = [item.nodeid + \":\", \"\"] + stats.get_description() + [\"\"]\n            gathered_statistics[item.nodeid] = lines\n            item.hypothesis_statistics = lines\n\n        with collector.with_value(note_statistics):\n            with with_reporter(store):\n                yield\n        if store.results:\n            item.hypothesis_report_information = list(store.results)\n\n\n@pytest.hookimpl(hookwrapper=True)\ndef pytest_runtest_makereport(item, call):\n    report = (yield).get_result()\n    if hasattr(item, \"hypothesis_report_information\"):\n        report.sections.append(\n            (\"Hypothesis\", \"\\n\".join(item.hypothesis_report_information))\n        )\n    if hasattr(item, \"hypothesis_statistics\") and report.when == \"teardown\":\n        # Running on pytest < 3.5 where user_properties doesn't exist, fall\n        # back on the global gathered_statistics (which breaks under xdist)\n        if hasattr(report, \"user_properties\"):  # pragma: no branch\n            val = (\"hypothesis-stats\", item.hypothesis_statistics)\n            # Workaround for https://github.com/pytest-dev/pytest/issues/4034\n            if isinstance(report.user_properties, tuple):\n                report.user_properties += (val,)\n            else:\n                report.user_properties.append(val)\n\n\ndef pytest_terminal_summary(terminalreporter):\n    if not terminalreporter.config.getoption(PRINT_STATISTICS_OPTION):\n        return\n    terminalreporter.section(\"Hypothesis Statistics\")\n\n    if LooseVersion(pytest.__version__) < \"3.5\":  # pragma: no cover\n        if not gathered_statistics:\n            terminalreporter.write_line(\n                \"Reporting Hypothesis statistics with pytest-xdist enabled \"\n                \"requires pytest >= 3.5\"\n            )\n        for lines in gathered_statistics.values():\n            for li in lines:\n                terminalreporter.write_line(li)\n        return\n\n    # terminalreporter.stats is a dict, where the empty string appears to\n    # always be the key for a list of _pytest.reports.TestReport objects\n    # (where we stored the statistics data in pytest_runtest_makereport above)\n    for test_report in terminalreporter.stats.get(\"\", []):\n        for name, lines in test_report.user_properties:\n            if name == \"hypothesis-stats\" and test_report.when == \"teardown\":\n                for li in lines:\n                    terminalreporter.write_line(li)\n\n\ndef pytest_collection_modifyitems(items):\n    for item in items:\n        if not isinstance(item, pytest.Function):\n            continue\n        if is_hypothesis_test(item.obj):\n            item.add_marker(\"hypothesis\")\n        if getattr(item.obj, \"is_hypothesis_strategy_function\", False):\n\n            def note_strategy_is_not_test(*args, **kwargs):\n                note_deprecation(\n                    \"%s is a function that returns a Hypothesis strategy, \"\n                    \"but pytest has collected it as a test function.  This \"\n                    \"is useless as the function body will never be executed.\"\n                    \"To define a test function, use @given instead of \"\n                    \"@composite.\" % (item.nodeid,),\n                    since=\"2018-11-02\",\n                )\n\n            item.obj = note_strategy_is_not_test\n\n\ndef load():\n    pass\n", "path": "hypothesis-python/src/hypothesis/extra/pytestplugin.py"}]}