prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [cliquet] Split tests from kinto package
  original : https://github.com/mozilla-services/cliquet/issues/267
  
  Should we have tests within the kinto package or outside ? that was discussed but I don't think a decision was made.
  
  Another related question is not wether tests is in kinto/ or outside, but rather : do we ship tests when we release kinto ? some people strip them when they build the release.
  
  [cliquet] Split tests from kinto package
  original : https://github.com/mozilla-services/cliquet/issues/267
  
  Should we have tests within the kinto package or outside ? that was discussed but I don't think a decision was made.
  
  Another related question is not wether tests is in kinto/ or outside, but rather : do we ship tests when we release kinto ? some people strip them when they build the release.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 import platform
  2 import codecs
  3 import os
  4 from setuptools import setup, find_packages
  5 
  6 here = os.path.abspath(os.path.dirname(__file__))
  7 
  8 
  9 def read_file(filename):
  10     """Open a related file and return its content."""
  11     with codecs.open(os.path.join(here, filename), encoding='utf-8') as f:
  12         content = f.read()
  13     return content
  14 
  15 README = read_file('README.rst')
  16 CHANGELOG = read_file('CHANGELOG.rst')
  17 CONTRIBUTORS = read_file('CONTRIBUTORS.rst')
  18 
  19 installed_with_pypy = platform.python_implementation() == 'PyPy'
  20 
  21 REQUIREMENTS = [
  22     'colander',
  23     'colorama',
  24     'cornice >= 1.1',  # Fix cache CORS
  25     'jsonschema',
  26     'python-dateutil',
  27     'pyramid_multiauth >= 0.8',  # User on policy selected event.
  28     'pyramid_tm',
  29     'requests',
  30     'six',
  31     'structlog >= 16.1.0',
  32     'enum34',
  33     'waitress',
  34 ]
  35 
  36 if installed_with_pypy:
  37     # We install psycopg2cffi instead of psycopg2 when dealing with pypy
  38     # Note: JSONB support landed after psycopg2cffi 2.7.0
  39     POSTGRESQL_REQUIRES = [
  40         'SQLAlchemy',
  41         'psycopg2cffi>2.7.0',
  42         'zope.sqlalchemy',
  43     ]
  44 else:
  45     # ujson is not pypy compliant, as it uses the CPython C API
  46     REQUIREMENTS.append('ujson >= 1.35')
  47     POSTGRESQL_REQUIRES = [
  48         'SQLAlchemy',
  49         'psycopg2>2.5',
  50         'zope.sqlalchemy',
  51     ]
  52 
  53 REDIS_REQUIRES = [
  54     'kinto_redis'
  55 ]
  56 
  57 DEPENDENCY_LINKS = [
  58 ]
  59 
  60 MONITORING_REQUIRES = [
  61     'raven',
  62     'statsd',
  63     'newrelic',
  64     'werkzeug',
  65 ]
  66 
  67 ENTRY_POINTS = {
  68     'paste.app_factory': [
  69         'main = kinto:main',
  70     ],
  71     'console_scripts': [
  72         'kinto = kinto.__main__:main'
  73     ],
  74 }
  75 
  76 
  77 setup(name='kinto',
  78       version='4.1.0.dev0',
  79       description='Kinto Web Service - Store, Sync, Share, and Self-Host.',
  80       long_description=README + "\n\n" + CHANGELOG + "\n\n" + CONTRIBUTORS,
  81       license='Apache License (2.0)',
  82       classifiers=[
  83           "Programming Language :: Python",
  84           "Programming Language :: Python :: 2",
  85           "Programming Language :: Python :: 2.7",
  86           "Programming Language :: Python :: 3",
  87           "Programming Language :: Python :: 3.4",
  88           "Programming Language :: Python :: 3.5",
  89           "Programming Language :: Python :: Implementation :: CPython",
  90           "Programming Language :: Python :: Implementation :: PyPy",
  91           "Topic :: Internet :: WWW/HTTP",
  92           "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
  93           "License :: OSI Approved :: Apache Software License"
  94       ],
  95       keywords="web sync json storage services",
  96       author='Mozilla Services',
  97       author_email='storage-team@mozilla.com',
  98       url='https://github.com/Kinto/kinto',
  99       packages=find_packages(),
  100       package_data={'': ['*.rst', '*.py']},
  101       include_package_data=True,
  102       zip_safe=False,
  103       install_requires=REQUIREMENTS,
  104       extras_require={
  105           'redis': REDIS_REQUIRES,
  106           'postgresql': POSTGRESQL_REQUIRES,
  107           'monitoring': MONITORING_REQUIRES,
  108           ":python_version=='2.7'": ["functools32", "futures"],
  109       },
  110       test_suite="kinto.tests",
  111       dependency_links=DEPENDENCY_LINKS,
  112       entry_points=ENTRY_POINTS)
  113
  ```
  --- 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/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -54,6 +54,15 @@
       'kinto_redis'
   ]
   
  +SETUP_REQUIRES = [
  +    'pytest-runner'
  +]
  +
  +TEST_REQUIREMENTS = [
  +    'pytest',
  +    'WebTest'
  +]
  +
   DEPENDENCY_LINKS = [
   ]
   
  @@ -100,6 +109,8 @@
         package_data={'': ['*.rst', '*.py']},
         include_package_data=True,
         zip_safe=False,
  +      setup_requires=SETUP_REQUIRES,
  +      tests_require=TEST_REQUIREMENTS,
         install_requires=REQUIREMENTS,
         extras_require={
             'redis': REDIS_REQUIRES,
  @@ -107,6 +118,6 @@
             'monitoring': MONITORING_REQUIRES,
             ":python_version=='2.7'": ["functools32", "futures"],
         },
  -      test_suite="kinto.tests",
  +      test_suite="tests",
         dependency_links=DEPENDENCY_LINKS,
         entry_points=ENTRY_POINTS)
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -54,6 +54,15 @@\n     'kinto_redis'\n ]\n \n+SETUP_REQUIRES = [\n+    'pytest-runner'\n+]\n+\n+TEST_REQUIREMENTS = [\n+    'pytest',\n+    'WebTest'\n+]\n+\n DEPENDENCY_LINKS = [\n ]\n \n@@ -100,6 +109,8 @@\n       package_data={'': ['*.rst', '*.py']},\n       include_package_data=True,\n       zip_safe=False,\n+      setup_requires=SETUP_REQUIRES,\n+      tests_require=TEST_REQUIREMENTS,\n       install_requires=REQUIREMENTS,\n       extras_require={\n           'redis': REDIS_REQUIRES,\n@@ -107,6 +118,6 @@\n           'monitoring': MONITORING_REQUIRES,\n           \":python_version=='2.7'\": [\"functools32\", \"futures\"],\n       },\n-      test_suite=\"kinto.tests\",\n+      test_suite=\"tests\",\n       dependency_links=DEPENDENCY_LINKS,\n       entry_points=ENTRY_POINTS)\n", "issue": "[cliquet] Split tests from kinto package\noriginal : https://github.com/mozilla-services/cliquet/issues/267\n\nShould we have tests within the kinto package or outside ? that was discussed but I don't think a decision was made.\n\nAnother related question is not wether tests is in kinto/ or outside, but rather : do we ship tests when we release kinto ? some people strip them when they build the release.\n\n[cliquet] Split tests from kinto package\noriginal : https://github.com/mozilla-services/cliquet/issues/267\n\nShould we have tests within the kinto package or outside ? that was discussed but I don't think a decision was made.\n\nAnother related question is not wether tests is in kinto/ or outside, but rather : do we ship tests when we release kinto ? some people strip them when they build the release.\n\n", "before_files": [{"content": "import platform\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read_file(filename):\n    \"\"\"Open a related file and return its content.\"\"\"\n    with codecs.open(os.path.join(here, filename), encoding='utf-8') as f:\n        content = f.read()\n    return content\n\nREADME = read_file('README.rst')\nCHANGELOG = read_file('CHANGELOG.rst')\nCONTRIBUTORS = read_file('CONTRIBUTORS.rst')\n\ninstalled_with_pypy = platform.python_implementation() == 'PyPy'\n\nREQUIREMENTS = [\n    'colander',\n    'colorama',\n    'cornice >= 1.1',  # Fix cache CORS\n    'jsonschema',\n    'python-dateutil',\n    'pyramid_multiauth >= 0.8',  # User on policy selected event.\n    'pyramid_tm',\n    'requests',\n    'six',\n    'structlog >= 16.1.0',\n    'enum34',\n    'waitress',\n]\n\nif installed_with_pypy:\n    # We install psycopg2cffi instead of psycopg2 when dealing with pypy\n    # Note: JSONB support landed after psycopg2cffi 2.7.0\n    POSTGRESQL_REQUIRES = [\n        'SQLAlchemy',\n        'psycopg2cffi>2.7.0',\n        'zope.sqlalchemy',\n    ]\nelse:\n    # ujson is not pypy compliant, as it uses the CPython C API\n    REQUIREMENTS.append('ujson >= 1.35')\n    POSTGRESQL_REQUIRES = [\n        'SQLAlchemy',\n        'psycopg2>2.5',\n        'zope.sqlalchemy',\n    ]\n\nREDIS_REQUIRES = [\n    'kinto_redis'\n]\n\nDEPENDENCY_LINKS = [\n]\n\nMONITORING_REQUIRES = [\n    'raven',\n    'statsd',\n    'newrelic',\n    'werkzeug',\n]\n\nENTRY_POINTS = {\n    'paste.app_factory': [\n        'main = kinto:main',\n    ],\n    'console_scripts': [\n        'kinto = kinto.__main__:main'\n    ],\n}\n\n\nsetup(name='kinto',\n      version='4.1.0.dev0',\n      description='Kinto Web Service - Store, Sync, Share, and Self-Host.',\n      long_description=README + \"\\n\\n\" + CHANGELOG + \"\\n\\n\" + CONTRIBUTORS,\n      license='Apache License (2.0)',\n      classifiers=[\n          \"Programming Language :: Python\",\n          \"Programming Language :: Python :: 2\",\n          \"Programming Language :: Python :: 2.7\",\n          \"Programming Language :: Python :: 3\",\n          \"Programming Language :: Python :: 3.4\",\n          \"Programming Language :: Python :: 3.5\",\n          \"Programming Language :: Python :: Implementation :: CPython\",\n          \"Programming Language :: Python :: Implementation :: PyPy\",\n          \"Topic :: Internet :: WWW/HTTP\",\n          \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\",\n          \"License :: OSI Approved :: Apache Software License\"\n      ],\n      keywords=\"web sync json storage services\",\n      author='Mozilla Services',\n      author_email='storage-team@mozilla.com',\n      url='https://github.com/Kinto/kinto',\n      packages=find_packages(),\n      package_data={'': ['*.rst', '*.py']},\n      include_package_data=True,\n      zip_safe=False,\n      install_requires=REQUIREMENTS,\n      extras_require={\n          'redis': REDIS_REQUIRES,\n          'postgresql': POSTGRESQL_REQUIRES,\n          'monitoring': MONITORING_REQUIRES,\n          \":python_version=='2.7'\": [\"functools32\", \"futures\"],\n      },\n      test_suite=\"kinto.tests\",\n      dependency_links=DEPENDENCY_LINKS,\n      entry_points=ENTRY_POINTS)\n", "path": "setup.py"}], "after_files": [{"content": "import platform\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read_file(filename):\n    \"\"\"Open a related file and return its content.\"\"\"\n    with codecs.open(os.path.join(here, filename), encoding='utf-8') as f:\n        content = f.read()\n    return content\n\nREADME = read_file('README.rst')\nCHANGELOG = read_file('CHANGELOG.rst')\nCONTRIBUTORS = read_file('CONTRIBUTORS.rst')\n\ninstalled_with_pypy = platform.python_implementation() == 'PyPy'\n\nREQUIREMENTS = [\n    'colander',\n    'colorama',\n    'cornice >= 1.1',  # Fix cache CORS\n    'jsonschema',\n    'python-dateutil',\n    'pyramid_multiauth >= 0.8',  # User on policy selected event.\n    'pyramid_tm',\n    'requests',\n    'six',\n    'structlog >= 16.1.0',\n    'enum34',\n    'waitress',\n]\n\nif installed_with_pypy:\n    # We install psycopg2cffi instead of psycopg2 when dealing with pypy\n    # Note: JSONB support landed after psycopg2cffi 2.7.0\n    POSTGRESQL_REQUIRES = [\n        'SQLAlchemy',\n        'psycopg2cffi>2.7.0',\n        'zope.sqlalchemy',\n    ]\nelse:\n    # ujson is not pypy compliant, as it uses the CPython C API\n    REQUIREMENTS.append('ujson >= 1.35')\n    POSTGRESQL_REQUIRES = [\n        'SQLAlchemy',\n        'psycopg2>2.5',\n        'zope.sqlalchemy',\n    ]\n\nREDIS_REQUIRES = [\n    'kinto_redis'\n]\n\nSETUP_REQUIRES = [\n    'pytest-runner'\n]\n\nTEST_REQUIREMENTS = [\n    'pytest',\n    'WebTest'\n]\n\nDEPENDENCY_LINKS = [\n]\n\nMONITORING_REQUIRES = [\n    'raven',\n    'statsd',\n    'newrelic',\n    'werkzeug',\n]\n\nENTRY_POINTS = {\n    'paste.app_factory': [\n        'main = kinto:main',\n    ],\n    'console_scripts': [\n        'kinto = kinto.__main__:main'\n    ],\n}\n\n\nsetup(name='kinto',\n      version='4.1.0.dev0',\n      description='Kinto Web Service - Store, Sync, Share, and Self-Host.',\n      long_description=README + \"\\n\\n\" + CHANGELOG + \"\\n\\n\" + CONTRIBUTORS,\n      license='Apache License (2.0)',\n      classifiers=[\n          \"Programming Language :: Python\",\n          \"Programming Language :: Python :: 2\",\n          \"Programming Language :: Python :: 2.7\",\n          \"Programming Language :: Python :: 3\",\n          \"Programming Language :: Python :: 3.4\",\n          \"Programming Language :: Python :: 3.5\",\n          \"Programming Language :: Python :: Implementation :: CPython\",\n          \"Programming Language :: Python :: Implementation :: PyPy\",\n          \"Topic :: Internet :: WWW/HTTP\",\n          \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\",\n          \"License :: OSI Approved :: Apache Software License\"\n      ],\n      keywords=\"web sync json storage services\",\n      author='Mozilla Services',\n      author_email='storage-team@mozilla.com',\n      url='https://github.com/Kinto/kinto',\n      packages=find_packages(),\n      package_data={'': ['*.rst', '*.py']},\n      include_package_data=True,\n      zip_safe=False,\n      setup_requires=SETUP_REQUIRES,\n      tests_require=TEST_REQUIREMENTS,\n      install_requires=REQUIREMENTS,\n      extras_require={\n          'redis': REDIS_REQUIRES,\n          'postgresql': POSTGRESQL_REQUIRES,\n          'monitoring': MONITORING_REQUIRES,\n          \":python_version=='2.7'\": [\"functools32\", \"futures\"],\n      },\n      test_suite=\"tests\",\n      dependency_links=DEPENDENCY_LINKS,\n      entry_points=ENTRY_POINTS)\n", "path": "setup.py"}]}