prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Creating Integration Tests needs an example plug-in
  We have test code here, without the corresponding tested code: http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/testing.html#creating-integration-tests. It would be good to see what it would look like.
  
  
  </issue>
  <code>
  [start of docs/narr/MyProject/setup.py]
  1 import os
  2 
  3 from setuptools import setup, find_packages
  4 
  5 here = os.path.abspath(os.path.dirname(__file__))
  6 with open(os.path.join(here, 'README.txt')) as f:
  7     README = f.read()
  8 with open(os.path.join(here, 'CHANGES.txt')) as f:
  9     CHANGES = f.read()
  10 
  11 requires = [
  12     'pyramid',
  13     'pyramid_chameleon',
  14     'pyramid_debugtoolbar',
  15     'waitress',
  16     ]
  17 
  18 setup(name='MyProject',
  19       version='0.0',
  20       description='MyProject',
  21       long_description=README + '\n\n' + CHANGES,
  22       classifiers=[
  23         "Programming Language :: Python",
  24         "Framework :: Pyramid",
  25         "Topic :: Internet :: WWW/HTTP",
  26         "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
  27         ],
  28       author='',
  29       author_email='',
  30       url='',
  31       keywords='web pyramid pylons',
  32       packages=find_packages(),
  33       include_package_data=True,
  34       zip_safe=False,
  35       install_requires=requires,
  36       tests_require=requires,
  37       test_suite="myproject",
  38       entry_points="""\
  39       [paste.app_factory]
  40       main = myproject:main
  41       """,
  42       )
  43
  [end of docs/narr/MyProject/setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/docs/narr/MyProject/setup.py b/docs/narr/MyProject/setup.py
  --- a/docs/narr/MyProject/setup.py
  +++ b/docs/narr/MyProject/setup.py
  @@ -1,30 +1,42 @@
  -import os
  +"""Setup for the MyProject package.
   
  +"""
  +import os
   from setuptools import setup, find_packages
   
  -here = os.path.abspath(os.path.dirname(__file__))
  -with open(os.path.join(here, 'README.txt')) as f:
  -    README = f.read()
  -with open(os.path.join(here, 'CHANGES.txt')) as f:
  -    CHANGES = f.read()
   
  -requires = [
  +HERE = os.path.abspath(os.path.dirname(__file__))
  +
  +
  +with open(os.path.join(HERE, 'README.txt')) as fp:
  +    README = fp.read()
  +
  +
  +with open(os.path.join(HERE, 'CHANGES.txt')) as fp:
  +    CHANGES = fp.read()
  +
  +
  +REQUIRES = [
       'pyramid',
       'pyramid_chameleon',
       'pyramid_debugtoolbar',
       'waitress',
       ]
   
  +TESTS_REQUIRE = [
  +    'webtest'
  +    ]
  +
   setup(name='MyProject',
         version='0.0',
         description='MyProject',
         long_description=README + '\n\n' + CHANGES,
         classifiers=[
  -        "Programming Language :: Python",
  -        "Framework :: Pyramid",
  -        "Topic :: Internet :: WWW/HTTP",
  -        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
  -        ],
  +          'Programming Language :: Python',
  +          'Framework :: Pyramid',
  +          'Topic :: Internet :: WWW/HTTP',
  +          'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
  +      ],
         author='',
         author_email='',
         url='',
  @@ -32,11 +44,10 @@
         packages=find_packages(),
         include_package_data=True,
         zip_safe=False,
  -      install_requires=requires,
  -      tests_require=requires,
  -      test_suite="myproject",
  +      install_requires=REQUIRES,
  +      tests_require=TESTS_REQUIRE,
  +      test_suite='myproject',
         entry_points="""\
         [paste.app_factory]
         main = myproject:main
  -      """,
  -      )
  +      """)
  
verification_info: {"golden_diff": "diff --git a/docs/narr/MyProject/setup.py b/docs/narr/MyProject/setup.py\n--- a/docs/narr/MyProject/setup.py\n+++ b/docs/narr/MyProject/setup.py\n@@ -1,30 +1,42 @@\n-import os\n+\"\"\"Setup for the MyProject package.\n \n+\"\"\"\n+import os\n from setuptools import setup, find_packages\n \n-here = os.path.abspath(os.path.dirname(__file__))\n-with open(os.path.join(here, 'README.txt')) as f:\n-    README = f.read()\n-with open(os.path.join(here, 'CHANGES.txt')) as f:\n-    CHANGES = f.read()\n \n-requires = [\n+HERE = os.path.abspath(os.path.dirname(__file__))\n+\n+\n+with open(os.path.join(HERE, 'README.txt')) as fp:\n+    README = fp.read()\n+\n+\n+with open(os.path.join(HERE, 'CHANGES.txt')) as fp:\n+    CHANGES = fp.read()\n+\n+\n+REQUIRES = [\n     'pyramid',\n     'pyramid_chameleon',\n     'pyramid_debugtoolbar',\n     'waitress',\n     ]\n \n+TESTS_REQUIRE = [\n+    'webtest'\n+    ]\n+\n setup(name='MyProject',\n       version='0.0',\n       description='MyProject',\n       long_description=README + '\\n\\n' + CHANGES,\n       classifiers=[\n-        \"Programming Language :: Python\",\n-        \"Framework :: Pyramid\",\n-        \"Topic :: Internet :: WWW/HTTP\",\n-        \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\",\n-        ],\n+          'Programming Language :: Python',\n+          'Framework :: Pyramid',\n+          'Topic :: Internet :: WWW/HTTP',\n+          'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',\n+      ],\n       author='',\n       author_email='',\n       url='',\n@@ -32,11 +44,10 @@\n       packages=find_packages(),\n       include_package_data=True,\n       zip_safe=False,\n-      install_requires=requires,\n-      tests_require=requires,\n-      test_suite=\"myproject\",\n+      install_requires=REQUIRES,\n+      tests_require=TESTS_REQUIRE,\n+      test_suite='myproject',\n       entry_points=\"\"\"\\\n       [paste.app_factory]\n       main = myproject:main\n-      \"\"\",\n-      )\n+      \"\"\")\n", "issue": "Creating Integration Tests needs an example plug-in\nWe have test code here, without the corresponding tested code: http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/testing.html#creating-integration-tests. It would be good to see what it would look like.\n\n", "before_files": [{"content": "import os\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nwith open(os.path.join(here, 'README.txt')) as f:\n    README = f.read()\nwith open(os.path.join(here, 'CHANGES.txt')) as f:\n    CHANGES = f.read()\n\nrequires = [\n    'pyramid',\n    'pyramid_chameleon',\n    'pyramid_debugtoolbar',\n    'waitress',\n    ]\n\nsetup(name='MyProject',\n      version='0.0',\n      description='MyProject',\n      long_description=README + '\\n\\n' + CHANGES,\n      classifiers=[\n        \"Programming Language :: Python\",\n        \"Framework :: Pyramid\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\",\n        ],\n      author='',\n      author_email='',\n      url='',\n      keywords='web pyramid pylons',\n      packages=find_packages(),\n      include_package_data=True,\n      zip_safe=False,\n      install_requires=requires,\n      tests_require=requires,\n      test_suite=\"myproject\",\n      entry_points=\"\"\"\\\n      [paste.app_factory]\n      main = myproject:main\n      \"\"\",\n      )\n", "path": "docs/narr/MyProject/setup.py"}]}