prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  2 failed tests when tox is not used (missing fixture "benchmark")
  `pytest-benchmark` is not present in `tests_require`, so there are 2 failed tests in `tests/benchmark/test_route_resolution_benchmark.py` when tox is not used.
  
  This requirement is present in `tox.ini` so tox and Travis CI are working fine.
  
  (I don't know what's a better fix — disable the benchmark tests or add `pytest-benchmark` to `tests_require`, so I didn't create a PR)
  
  </issue>
  <code>
  [start of setup.py]
  1 """
  2 Sanic
  3 """
  4 import codecs
  5 import os
  6 import re
  7 import sys
  8 from distutils.util import strtobool
  9 
  10 from setuptools import setup
  11 from setuptools.command.test import test as TestCommand
  12 
  13 
  14 class PyTest(TestCommand):
  15     """
  16     Provide a Test runner to be used from setup.py to run unit tests
  17     """
  18 
  19     user_options = [("pytest-args=", "a", "Arguments to pass to pytest")]
  20 
  21     def initialize_options(self):
  22         TestCommand.initialize_options(self)
  23         self.pytest_args = ""
  24 
  25     def run_tests(self):
  26         import shlex
  27         import pytest
  28 
  29         errno = pytest.main(shlex.split(self.pytest_args))
  30         sys.exit(errno)
  31 
  32 
  33 def open_local(paths, mode="r", encoding="utf8"):
  34     path = os.path.join(os.path.abspath(os.path.dirname(__file__)), *paths)
  35 
  36     return codecs.open(path, mode, encoding)
  37 
  38 
  39 with open_local(["sanic", "__init__.py"], encoding="latin1") as fp:
  40     try:
  41         version = re.findall(
  42             r"^__version__ = \"([^']+)\"\r?$", fp.read(), re.M
  43         )[0]
  44     except IndexError:
  45         raise RuntimeError("Unable to determine version.")
  46 
  47 with open_local(["README.rst"]) as rm:
  48     long_description = rm.read()
  49 
  50 setup_kwargs = {
  51     "name": "sanic",
  52     "version": version,
  53     "url": "http://github.com/channelcat/sanic/",
  54     "license": "MIT",
  55     "author": "Channel Cat",
  56     "author_email": "channelcat@gmail.com",
  57     "description": (
  58         "A microframework based on uvloop, httptools, and learnings of flask"
  59     ),
  60     "long_description": long_description,
  61     "packages": ["sanic"],
  62     "platforms": "any",
  63     "classifiers": [
  64         "Development Status :: 4 - Beta",
  65         "Environment :: Web Environment",
  66         "License :: OSI Approved :: MIT License",
  67         "Programming Language :: Python :: 3.5",
  68         "Programming Language :: Python :: 3.6",
  69         "Programming Language :: Python :: 3.7",
  70     ],
  71 }
  72 
  73 env_dependency = (
  74     '; sys_platform != "win32" ' 'and implementation_name == "cpython"'
  75 )
  76 ujson = "ujson>=1.35" + env_dependency
  77 uvloop = "uvloop>=0.5.3" + env_dependency
  78 
  79 requirements = [
  80     "httptools>=0.0.10",
  81     uvloop,
  82     ujson,
  83     "aiofiles>=0.3.0",
  84     "websockets>=6.0,<7.0",
  85     "multidict>=4.0,<5.0",
  86 ]
  87 
  88 tests_require = [
  89     "pytest==4.1.0",
  90     "multidict>=4.0,<5.0",
  91     "gunicorn",
  92     "pytest-cov",
  93     "aiohttp>=2.3.0,<=3.2.1",
  94     "beautifulsoup4",
  95     uvloop,
  96     ujson,
  97     "pytest-sanic",
  98     "pytest-sugar",
  99 ]
  100 
  101 if strtobool(os.environ.get("SANIC_NO_UJSON", "no")):
  102     print("Installing without uJSON")
  103     requirements.remove(ujson)
  104     tests_require.remove(ujson)
  105 
  106 # 'nt' means windows OS
  107 if strtobool(os.environ.get("SANIC_NO_UVLOOP", "no")):
  108     print("Installing without uvLoop")
  109     requirements.remove(uvloop)
  110     tests_require.remove(uvloop)
  111 
  112 extras_require = {
  113     "test": tests_require,
  114     "dev": tests_require + ["aiofiles", "tox", "black", "flake8"],
  115     "docs": [
  116         "sphinx",
  117         "sphinx_rtd_theme",
  118         "recommonmark",
  119         "sphinxcontrib-asyncio",
  120         "docutils",
  121         "pygments"
  122     ],
  123 }
  124 
  125 setup_kwargs["install_requires"] = requirements
  126 setup_kwargs["tests_require"] = tests_require
  127 setup_kwargs["extras_require"] = extras_require
  128 setup_kwargs["cmdclass"] = {"test": PyTest}
  129 setup(**setup_kwargs)
  130
  [end of 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/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -96,6 +96,7 @@
       ujson,
       "pytest-sanic",
       "pytest-sugar",
  +    "pytest-benchmark",
   ]
   
   if strtobool(os.environ.get("SANIC_NO_UJSON", "no")):
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -96,6 +96,7 @@\n     ujson,\n     \"pytest-sanic\",\n     \"pytest-sugar\",\n+    \"pytest-benchmark\",\n ]\n \n if strtobool(os.environ.get(\"SANIC_NO_UJSON\", \"no\")):\n", "issue": "2 failed tests when tox is not used (missing fixture \"benchmark\")\n`pytest-benchmark` is not present in `tests_require`, so there are 2 failed tests in `tests/benchmark/test_route_resolution_benchmark.py` when tox is not used.\r\n\r\nThis requirement is present in `tox.ini` so tox and Travis CI are working fine.\r\n\r\n(I don't know what's a better fix \u2014 disable the benchmark tests or add `pytest-benchmark` to `tests_require`, so I didn't create a PR)\n", "before_files": [{"content": "\"\"\"\nSanic\n\"\"\"\nimport codecs\nimport os\nimport re\nimport sys\nfrom distutils.util import strtobool\n\nfrom setuptools import setup\nfrom setuptools.command.test import test as TestCommand\n\n\nclass PyTest(TestCommand):\n    \"\"\"\n    Provide a Test runner to be used from setup.py to run unit tests\n    \"\"\"\n\n    user_options = [(\"pytest-args=\", \"a\", \"Arguments to pass to pytest\")]\n\n    def initialize_options(self):\n        TestCommand.initialize_options(self)\n        self.pytest_args = \"\"\n\n    def run_tests(self):\n        import shlex\n        import pytest\n\n        errno = pytest.main(shlex.split(self.pytest_args))\n        sys.exit(errno)\n\n\ndef open_local(paths, mode=\"r\", encoding=\"utf8\"):\n    path = os.path.join(os.path.abspath(os.path.dirname(__file__)), *paths)\n\n    return codecs.open(path, mode, encoding)\n\n\nwith open_local([\"sanic\", \"__init__.py\"], encoding=\"latin1\") as fp:\n    try:\n        version = re.findall(\n            r\"^__version__ = \\\"([^']+)\\\"\\r?$\", fp.read(), re.M\n        )[0]\n    except IndexError:\n        raise RuntimeError(\"Unable to determine version.\")\n\nwith open_local([\"README.rst\"]) as rm:\n    long_description = rm.read()\n\nsetup_kwargs = {\n    \"name\": \"sanic\",\n    \"version\": version,\n    \"url\": \"http://github.com/channelcat/sanic/\",\n    \"license\": \"MIT\",\n    \"author\": \"Channel Cat\",\n    \"author_email\": \"channelcat@gmail.com\",\n    \"description\": (\n        \"A microframework based on uvloop, httptools, and learnings of flask\"\n    ),\n    \"long_description\": long_description,\n    \"packages\": [\"sanic\"],\n    \"platforms\": \"any\",\n    \"classifiers\": [\n        \"Development Status :: 4 - Beta\",\n        \"Environment :: Web Environment\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n}\n\nenv_dependency = (\n    '; sys_platform != \"win32\" ' 'and implementation_name == \"cpython\"'\n)\nujson = \"ujson>=1.35\" + env_dependency\nuvloop = \"uvloop>=0.5.3\" + env_dependency\n\nrequirements = [\n    \"httptools>=0.0.10\",\n    uvloop,\n    ujson,\n    \"aiofiles>=0.3.0\",\n    \"websockets>=6.0,<7.0\",\n    \"multidict>=4.0,<5.0\",\n]\n\ntests_require = [\n    \"pytest==4.1.0\",\n    \"multidict>=4.0,<5.0\",\n    \"gunicorn\",\n    \"pytest-cov\",\n    \"aiohttp>=2.3.0,<=3.2.1\",\n    \"beautifulsoup4\",\n    uvloop,\n    ujson,\n    \"pytest-sanic\",\n    \"pytest-sugar\",\n]\n\nif strtobool(os.environ.get(\"SANIC_NO_UJSON\", \"no\")):\n    print(\"Installing without uJSON\")\n    requirements.remove(ujson)\n    tests_require.remove(ujson)\n\n# 'nt' means windows OS\nif strtobool(os.environ.get(\"SANIC_NO_UVLOOP\", \"no\")):\n    print(\"Installing without uvLoop\")\n    requirements.remove(uvloop)\n    tests_require.remove(uvloop)\n\nextras_require = {\n    \"test\": tests_require,\n    \"dev\": tests_require + [\"aiofiles\", \"tox\", \"black\", \"flake8\"],\n    \"docs\": [\n        \"sphinx\",\n        \"sphinx_rtd_theme\",\n        \"recommonmark\",\n        \"sphinxcontrib-asyncio\",\n        \"docutils\",\n        \"pygments\"\n    ],\n}\n\nsetup_kwargs[\"install_requires\"] = requirements\nsetup_kwargs[\"tests_require\"] = tests_require\nsetup_kwargs[\"extras_require\"] = extras_require\nsetup_kwargs[\"cmdclass\"] = {\"test\": PyTest}\nsetup(**setup_kwargs)\n", "path": "setup.py"}]}