prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  PyPy performance on test_image_point is awful
  Hoisted from #476, test_image_point.py takes ~ 2 minutes to run, vs < 1 sec for cpython.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `profile-installed.py`
  Content:
  ```
  1 #!/usr/bin/env python
  2 import nose
  3 import os
  4 import sys
  5 import glob
  6 
  7 import profile
  8 
  9 # monkey with the path, removing the local directory but adding the Tests/
  10 # directory for helper.py and the other local imports there.
  11 
  12 del(sys.path[0])
  13 sys.path.insert(0, os.path.abspath('./Tests'))
  14 
  15 # if there's no test selected (mostly) choose a working default.
  16 # Something is required, because if we import the tests from the local
  17 # directory, once again, we've got the non-installed PIL in the way
  18 if len(sys.argv) == 1:
  19     sys.argv.extend(glob.glob('Tests/test*.py'))
  20 
  21 # Make sure that nose doesn't muck with our paths.
  22 if ('--no-path-adjustment' not in sys.argv) and ('-P' not in sys.argv):
  23     sys.argv.insert(1, '--no-path-adjustment')
  24 
  25 if 'NOSE_PROCESSES' not in os.environ:
  26     for arg in sys.argv:
  27         if '--processes' in arg:
  28             break
  29     else: #  for
  30         sys.argv.insert(1, '--processes=-1') # -1 == number of cores
  31         sys.argv.insert(1, '--process-timeout=30') 
  32     
  33 if __name__ == '__main__':
  34     profile.run("nose.main()", sort=2)
  35
  ```
  --- 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/profile-installed.py b/profile-installed.py
  --- a/profile-installed.py
  +++ b/profile-installed.py
  @@ -21,14 +21,6 @@
   # Make sure that nose doesn't muck with our paths.
   if ('--no-path-adjustment' not in sys.argv) and ('-P' not in sys.argv):
       sys.argv.insert(1, '--no-path-adjustment')
  -
  -if 'NOSE_PROCESSES' not in os.environ:
  -    for arg in sys.argv:
  -        if '--processes' in arg:
  -            break
  -    else: #  for
  -        sys.argv.insert(1, '--processes=-1') # -1 == number of cores
  -        sys.argv.insert(1, '--process-timeout=30') 
       
   if __name__ == '__main__':
       profile.run("nose.main()", sort=2)
  
verification_info: {"golden_diff": "diff --git a/profile-installed.py b/profile-installed.py\n--- a/profile-installed.py\n+++ b/profile-installed.py\n@@ -21,14 +21,6 @@\n # Make sure that nose doesn't muck with our paths.\n if ('--no-path-adjustment' not in sys.argv) and ('-P' not in sys.argv):\n     sys.argv.insert(1, '--no-path-adjustment')\n-\n-if 'NOSE_PROCESSES' not in os.environ:\n-    for arg in sys.argv:\n-        if '--processes' in arg:\n-            break\n-    else: #  for\n-        sys.argv.insert(1, '--processes=-1') # -1 == number of cores\n-        sys.argv.insert(1, '--process-timeout=30') \n     \n if __name__ == '__main__':\n     profile.run(\"nose.main()\", sort=2)\n", "issue": "PyPy performance on test_image_point is awful\nHoisted from #476, test_image_point.py takes ~ 2 minutes to run, vs < 1 sec for cpython.\n\n", "before_files": [{"content": "#!/usr/bin/env python\nimport nose\nimport os\nimport sys\nimport glob\n\nimport profile\n\n# monkey with the path, removing the local directory but adding the Tests/\n# directory for helper.py and the other local imports there.\n\ndel(sys.path[0])\nsys.path.insert(0, os.path.abspath('./Tests'))\n\n# if there's no test selected (mostly) choose a working default.\n# Something is required, because if we import the tests from the local\n# directory, once again, we've got the non-installed PIL in the way\nif len(sys.argv) == 1:\n    sys.argv.extend(glob.glob('Tests/test*.py'))\n\n# Make sure that nose doesn't muck with our paths.\nif ('--no-path-adjustment' not in sys.argv) and ('-P' not in sys.argv):\n    sys.argv.insert(1, '--no-path-adjustment')\n\nif 'NOSE_PROCESSES' not in os.environ:\n    for arg in sys.argv:\n        if '--processes' in arg:\n            break\n    else: #  for\n        sys.argv.insert(1, '--processes=-1') # -1 == number of cores\n        sys.argv.insert(1, '--process-timeout=30') \n    \nif __name__ == '__main__':\n    profile.run(\"nose.main()\", sort=2)\n", "path": "profile-installed.py"}], "after_files": [{"content": "#!/usr/bin/env python\nimport nose\nimport os\nimport sys\nimport glob\n\nimport profile\n\n# monkey with the path, removing the local directory but adding the Tests/\n# directory for helper.py and the other local imports there.\n\ndel(sys.path[0])\nsys.path.insert(0, os.path.abspath('./Tests'))\n\n# if there's no test selected (mostly) choose a working default.\n# Something is required, because if we import the tests from the local\n# directory, once again, we've got the non-installed PIL in the way\nif len(sys.argv) == 1:\n    sys.argv.extend(glob.glob('Tests/test*.py'))\n\n# Make sure that nose doesn't muck with our paths.\nif ('--no-path-adjustment' not in sys.argv) and ('-P' not in sys.argv):\n    sys.argv.insert(1, '--no-path-adjustment')\n    \nif __name__ == '__main__':\n    profile.run(\"nose.main()\", sort=2)\n", "path": "profile-installed.py"}]}