prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [FR] Add integration tests to catch breaking changes in the API
  ### What's the problem this feature will solve?
  
  It would be nice to have integration tests focusing on the usage of setuptools "public API" by some popular packages in the community.
  
  This way we can catch breaking changes in the API before publishing new releases
  
  ### Describe the solution you'd like
  
  According to the discussion in https://github.com/pypa/setuptools/pull/2844, if adding a new "integration test suite", the following characteristics are desirable:
  
  1. It should run separated from the main test suite (integration tests are resource intensive and time consuming, so the best is to avoid always running them and postponing until a new release is ready).
  2. It should test how setuptools' API is being used by popular packages in the community to catch rare errors.
  
  ### Alternative Solutions
  
  _No response_
  
  ### Additional context
  
  _No response_
  
  ### Code of Conduct
  
  - [X] I agree to follow the PSF Code of Conduct
  
  --- 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 
  4 pytest_plugins = 'setuptools.tests.fixtures'
  5 
  6 
  7 def pytest_addoption(parser):
  8     parser.addoption(
  9         "--package_name", action="append", default=[],
  10         help="list of package_name to pass to test functions",
  11     )
  12 
  13 
  14 collect_ignore = [
  15     'tests/manual_test.py',
  16     'setuptools/tests/mod_with_constant.py',
  17     'setuptools/_distutils',
  18     '_distutils_hack',
  19     'setuptools/extern',
  20     'pkg_resources/extern',
  21     'pkg_resources/tests/data',
  22     'setuptools/_vendor',
  23     'pkg_resources/_vendor',
  24 ]
  25 
  26 
  27 if sys.version_info < (3, 6):
  28     collect_ignore.append('docs/conf.py')  # uses f-strings
  29     collect_ignore.append('pavement.py')
  30
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/conftest.py b/conftest.py
  --- a/conftest.py
  +++ b/conftest.py
  @@ -1,5 +1,7 @@
   import sys
   
  +import pytest
  +
   
   pytest_plugins = 'setuptools.tests.fixtures'
   
  @@ -9,6 +11,14 @@
           "--package_name", action="append", default=[],
           help="list of package_name to pass to test functions",
       )
  +    parser.addoption(
  +        "--integration", action="store_true", default=False,
  +        help="run integration tests (only)"
  +    )
  +
  +
  +def pytest_configure(config):
  +    config.addinivalue_line("markers", "integration: integration tests")
   
   
   collect_ignore = [
  @@ -27,3 +37,13 @@
   if sys.version_info < (3, 6):
       collect_ignore.append('docs/conf.py')  # uses f-strings
       collect_ignore.append('pavement.py')
  +
  +
  +@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")
  
verification_info: {"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -1,5 +1,7 @@\n import sys\n \n+import pytest\n+\n \n pytest_plugins = 'setuptools.tests.fixtures'\n \n@@ -9,6 +11,14 @@\n         \"--package_name\", action=\"append\", default=[],\n         help=\"list of package_name to pass to test functions\",\n     )\n+    parser.addoption(\n+        \"--integration\", action=\"store_true\", default=False,\n+        help=\"run integration tests (only)\"\n+    )\n+\n+\n+def pytest_configure(config):\n+    config.addinivalue_line(\"markers\", \"integration: integration tests\")\n \n \n collect_ignore = [\n@@ -27,3 +37,13 @@\n if sys.version_info < (3, 6):\n     collect_ignore.append('docs/conf.py')  # uses f-strings\n     collect_ignore.append('pavement.py')\n+\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", "issue": "[FR] Add integration tests to catch breaking changes in the API\n### What's the problem this feature will solve?\n\nIt would be nice to have integration tests focusing on the usage of setuptools \"public API\" by some popular packages in the community.\r\n\r\nThis way we can catch breaking changes in the API before publishing new releases\n\n### Describe the solution you'd like\n\nAccording to the discussion in https://github.com/pypa/setuptools/pull/2844, if adding a new \"integration test suite\", the following characteristics are desirable:\r\n\r\n1. It should run separated from the main test suite (integration tests are resource intensive and time consuming, so the best is to avoid always running them and postponing until a new release is ready).\r\n2. It should test how setuptools' API is being used by popular packages in the community to catch rare errors.\n\n### Alternative Solutions\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Code of Conduct\n\n- [X] I agree to follow the PSF Code of Conduct\n", "before_files": [{"content": "import sys\n\n\npytest_plugins = 'setuptools.tests.fixtures'\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\n        \"--package_name\", action=\"append\", default=[],\n        help=\"list of package_name to pass to test functions\",\n    )\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]\n\n\nif sys.version_info < (3, 6):\n    collect_ignore.append('docs/conf.py')  # uses f-strings\n    collect_ignore.append('pavement.py')\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\", action=\"append\", default=[],\n        help=\"list of package_name to pass to test functions\",\n    )\n    parser.addoption(\n        \"--integration\", action=\"store_true\", default=False,\n        help=\"run integration tests (only)\"\n    )\n\n\ndef pytest_configure(config):\n    config.addinivalue_line(\"markers\", \"integration: integration tests\")\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]\n\n\nif sys.version_info < (3, 6):\n    collect_ignore.append('docs/conf.py')  # uses f-strings\n    collect_ignore.append('pavement.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"}]}