We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deduplicate testing dependencies by referencing `[testing-integration]`
<!-- First time contributors: Take a moment to review https://setuptools.pypa.io/en/latest/development/developer-guide.html! -->
<!-- Remove sections if not applicable -->

## Summary of changes

This was my original idea, but in https://github.com/pypa/setuptools/pull/4257#discussion_r1514754970, @abravalheri mentioned that:
> [...] I think we just remove the `testing-integration` and use `testing` everywhere...
> 
> Although it might add a bit of overhead for the integration tests, it will simplify and streamline the setup... This way we reduce the divergence with `skeleton`. The additional overhead in the integration tests should not be too much, and the integration tests just run before the releases anyway.

But I'm still opening this PR as an option / for comparison.

Accepting this closes #4282

### Pull Request Checklist
- [x] Changes have tests (these are test changes)
- [x] News fragment added in [`newsfragments/`]. (no user facing changes)
  _(See [documentation][PR docs] for details)_


[`newsfragments/`]: https://github.com/pypa/setuptools/tree/master/newsfragments
[PR docs]:
https://setuptools.pypa.io/en/latest/development/developer-guide.html#making-a-pull-request


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conftest.py`
Content:
```
1 import sys
2 
3 import pytest
4 
5 
6 pytest_plugins = 'setuptools.tests.fixtures'
7 
8 
9 def pytest_addoption(parser):
10     parser.addoption(
11         "--package_name",
12         action="append",
13         default=[],
14         help="list of package_name to pass to test functions",
15     )
16     parser.addoption(
17         "--integration",
18         action="store_true",
19         default=False,
20         help="run integration tests (only)",
21     )
22 
23 
24 def pytest_configure(config):
25     config.addinivalue_line("markers", "integration: integration tests")
26     config.addinivalue_line("markers", "uses_network: tests may try to download files")
27 
28 
29 collect_ignore = [
30     'tests/manual_test.py',
31     'setuptools/tests/mod_with_constant.py',
32     'setuptools/_distutils',
33     '_distutils_hack',
34     'setuptools/extern',
35     'pkg_resources/extern',
36     'pkg_resources/tests/data',
37     'setuptools/_vendor',
38     'pkg_resources/_vendor',
39     'setuptools/config/_validate_pyproject',
40     'setuptools/modified.py',
41 ]
42 
43 
44 if sys.version_info < (3, 9) or sys.platform == 'cygwin':
45     collect_ignore.append('tools/finalize.py')
46 
47 
48 @pytest.fixture(autouse=True)
49 def _skip_integration(request):
50     running_integration_tests = request.config.getoption("--integration")
51     is_integration_test = request.node.get_closest_marker("integration")
52     if running_integration_tests and not is_integration_test:
53         pytest.skip("running integration tests only")
54     if not running_integration_tests and is_integration_test:
55         pytest.skip("skipping integration tests")
56
```
--- 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/conftest.py b/conftest.py
--- a/conftest.py
+++ b/conftest.py
@@ -24,6 +24,7 @@
 def pytest_configure(config):
     config.addinivalue_line("markers", "integration: integration tests")
     config.addinivalue_line("markers", "uses_network: tests may try to download files")
+    _IntegrationTestSpeedups.disable_plugins_already_run(config)
 
 
 collect_ignore = [
@@ -47,9 +48,25 @@
 
 @pytest.fixture(autouse=True)
 def _skip_integration(request):
-    running_integration_tests = request.config.getoption("--integration")
-    is_integration_test = request.node.get_closest_marker("integration")
-    if running_integration_tests and not is_integration_test:
-        pytest.skip("running integration tests only")
-    if not running_integration_tests and is_integration_test:
-        pytest.skip("skipping integration tests")
+    _IntegrationTestSpeedups.conditional_skip(request)
+
+
+class _IntegrationTestSpeedups:
+    """Speed-up integration tests by only running what does not run in other tests."""
+
+    RUNS_ON_NORMAL_TESTS = ("checkdocks", "cov", "mypy", "perf", "ruff")
+
+    @classmethod
+    def disable_plugins_already_run(cls, config):
+        if config.getoption("--integration"):
+            for plugin in cls.RUNS_ON_NORMAL_TESTS:  # no need to run again
+                config.pluginmanager.set_blocked(plugin)
+
+    @staticmethod
+    def conditional_skip(request):
+        running_integration_tests = request.config.getoption("--integration")
+        is_integration_test = request.node.get_closest_marker("integration")
+        if running_integration_tests and not is_integration_test:
+            pytest.skip("running integration tests only")
+        if not running_integration_tests and is_integration_test:
+            pytest.skip("skipping integration tests")

{"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -24,6 +24,7 @@\n def pytest_configure(config):\n     config.addinivalue_line(\"markers\", \"integration: integration tests\")\n     config.addinivalue_line(\"markers\", \"uses_network: tests may try to download files\")\n+    _IntegrationTestSpeedups.disable_plugins_already_run(config)\n \n \n collect_ignore = [\n@@ -47,9 +48,25 @@\n \n @pytest.fixture(autouse=True)\n def _skip_integration(request):\n-    running_integration_tests = request.config.getoption(\"--integration\")\n-    is_integration_test = request.node.get_closest_marker(\"integration\")\n-    if running_integration_tests and not is_integration_test:\n-        pytest.skip(\"running integration tests only\")\n-    if not running_integration_tests and is_integration_test:\n-        pytest.skip(\"skipping integration tests\")\n+    _IntegrationTestSpeedups.conditional_skip(request)\n+\n+\n+class _IntegrationTestSpeedups:\n+    \"\"\"Speed-up integration tests by only running what does not run in other tests.\"\"\"\n+\n+    RUNS_ON_NORMAL_TESTS = (\"checkdocks\", \"cov\", \"mypy\", \"perf\", \"ruff\")\n+\n+    @classmethod\n+    def disable_plugins_already_run(cls, config):\n+        if config.getoption(\"--integration\"):\n+            for plugin in cls.RUNS_ON_NORMAL_TESTS:  # no need to run again\n+                config.pluginmanager.set_blocked(plugin)\n+\n+    @staticmethod\n+    def conditional_skip(request):\n+        running_integration_tests = request.config.getoption(\"--integration\")\n+        is_integration_test = request.node.get_closest_marker(\"integration\")\n+        if running_integration_tests and not is_integration_test:\n+            pytest.skip(\"running integration tests only\")\n+        if not running_integration_tests and is_integration_test:\n+            pytest.skip(\"skipping integration tests\")\n", "issue": "Deduplicate testing dependencies by referencing `[testing-integration]`\n<!-- First time contributors: Take a moment to review https://setuptools.pypa.io/en/latest/development/developer-guide.html! -->\r\n<!-- Remove sections if not applicable -->\r\n\r\n## Summary of changes\r\n\r\nThis was my original idea, but in https://github.com/pypa/setuptools/pull/4257#discussion_r1514754970, @abravalheri mentioned that:\r\n> [...] I think we just remove the `testing-integration` and use `testing` everywhere...\r\n> \r\n> Although it might add a bit of overhead for the integration tests, it will simplify and streamline the setup... This way we reduce the divergence with `skeleton`. The additional overhead in the integration tests should not be too much, and the integration tests just run before the releases anyway.\r\n\r\nBut I'm still opening this PR as an option / for comparison.\r\n\r\nAccepting this closes #4282\r\n\r\n### Pull Request Checklist\r\n- [x] Changes have tests (these are test changes)\r\n- [x] News fragment added in [`newsfragments/`]. (no user facing changes)\r\n  _(See [documentation][PR docs] for details)_\r\n\r\n\r\n[`newsfragments/`]: https://github.com/pypa/setuptools/tree/master/newsfragments\r\n[PR docs]:\r\nhttps://setuptools.pypa.io/en/latest/development/developer-guide.html#making-a-pull-request\r\n\n", "before_files": [{"content": "import sys\n\nimport pytest\n\n\npytest_plugins = 'setuptools.tests.fixtures'\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\n        \"--package_name\",\n        action=\"append\",\n        default=[],\n        help=\"list of package_name to pass to test functions\",\n    )\n    parser.addoption(\n        \"--integration\",\n        action=\"store_true\",\n        default=False,\n        help=\"run integration tests (only)\",\n    )\n\n\ndef pytest_configure(config):\n    config.addinivalue_line(\"markers\", \"integration: integration tests\")\n    config.addinivalue_line(\"markers\", \"uses_network: tests may try to download files\")\n\n\ncollect_ignore = [\n    'tests/manual_test.py',\n    'setuptools/tests/mod_with_constant.py',\n    'setuptools/_distutils',\n    '_distutils_hack',\n    'setuptools/extern',\n    'pkg_resources/extern',\n    'pkg_resources/tests/data',\n    'setuptools/_vendor',\n    'pkg_resources/_vendor',\n    'setuptools/config/_validate_pyproject',\n    'setuptools/modified.py',\n]\n\n\nif sys.version_info < (3, 9) or sys.platform == 'cygwin':\n    collect_ignore.append('tools/finalize.py')\n\n\n@pytest.fixture(autouse=True)\ndef _skip_integration(request):\n    running_integration_tests = request.config.getoption(\"--integration\")\n    is_integration_test = request.node.get_closest_marker(\"integration\")\n    if running_integration_tests and not is_integration_test:\n        pytest.skip(\"running integration tests only\")\n    if not running_integration_tests and is_integration_test:\n        pytest.skip(\"skipping integration tests\")\n", "path": "conftest.py"}], "after_files": [{"content": "import sys\n\nimport pytest\n\n\npytest_plugins = 'setuptools.tests.fixtures'\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\n        \"--package_name\",\n        action=\"append\",\n        default=[],\n        help=\"list of package_name to pass to test functions\",\n    )\n    parser.addoption(\n        \"--integration\",\n        action=\"store_true\",\n        default=False,\n        help=\"run integration tests (only)\",\n    )\n\n\ndef pytest_configure(config):\n    config.addinivalue_line(\"markers\", \"integration: integration tests\")\n    config.addinivalue_line(\"markers\", \"uses_network: tests may try to download files\")\n    _IntegrationTestSpeedups.disable_plugins_already_run(config)\n\n\ncollect_ignore = [\n    'tests/manual_test.py',\n    'setuptools/tests/mod_with_constant.py',\n    'setuptools/_distutils',\n    '_distutils_hack',\n    'setuptools/extern',\n    'pkg_resources/extern',\n    'pkg_resources/tests/data',\n    'setuptools/_vendor',\n    'pkg_resources/_vendor',\n    'setuptools/config/_validate_pyproject',\n    'setuptools/modified.py',\n]\n\n\nif sys.version_info < (3, 9) or sys.platform == 'cygwin':\n    collect_ignore.append('tools/finalize.py')\n\n\n@pytest.fixture(autouse=True)\ndef _skip_integration(request):\n    _IntegrationTestSpeedups.conditional_skip(request)\n\n\nclass _IntegrationTestSpeedups:\n    \"\"\"Speed-up integration tests by only running what does not run in other tests.\"\"\"\n\n    RUNS_ON_NORMAL_TESTS = (\"checkdocks\", \"cov\", \"mypy\", \"perf\", \"ruff\")\n\n    @classmethod\n    def disable_plugins_already_run(cls, config):\n        if config.getoption(\"--integration\"):\n            for plugin in cls.RUNS_ON_NORMAL_TESTS:  # no need to run again\n                config.pluginmanager.set_blocked(plugin)\n\n    @staticmethod\n    def conditional_skip(request):\n        running_integration_tests = request.config.getoption(\"--integration\")\n        is_integration_test = request.node.get_closest_marker(\"integration\")\n        if running_integration_tests and not is_integration_test:\n            pytest.skip(\"running integration tests only\")\n        if not running_integration_tests and is_integration_test:\n            pytest.skip(\"skipping integration tests\")\n", "path": "conftest.py"}]}