We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error in running faker tests
Hi,

I use ```Python 3.5.2```.

I downloaded v0.7.3 archive from GH.

When I ran ``` python3 setup.py test```, I get a Fail; when I run ```python3 -m unittest -v faker.tests```, I get 'OK'

Did I do something the wrong way, since ipaddress is required for python 2.x or python 3.2?

Here's the full output

```
python3 setup.py test
running test
running egg_info
creating Faker.egg-info
writing top-level names to Faker.egg-info/top_level.txt
writing entry points to Faker.egg-info/entry_points.txt
writing requirements to Faker.egg-info/requires.txt
writing Faker.egg-info/PKG-INFO
writing dependency_links to Faker.egg-info/dependency_links.txt
writing manifest file 'Faker.egg-info/SOURCES.txt'
reading manifest file 'Faker.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.md'
writing manifest file 'Faker.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 78, in <module>
    'ipaddress',
  File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 159, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 140, in with_project_on_sys_path
    func()
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 180, in run_tests
    testRunner=self._resolve_as_ep(self.test_runner),
  File "/usr/lib/python3.5/unittest/main.py", line 93, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python3.5/unittest/main.py", line 140, in parseArgs
    self.createTests()
  File "/usr/lib/python3.5/unittest/main.py", line 147, in createTests
    self.module)
  File "/usr/lib/python3.5/unittest/loader.py", line 219, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.5/unittest/loader.py", line 219, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.5/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 30, in loadTestsFromModule
    for file in resource_listdir(module.__name__, ''):
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1170, in resource_listdir
    resource_name
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1466, in resource_listdir
    return self._listdir(self._fn(self.module_path, resource_name))
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1505, in _listdir
    "Can't perform this operation for unregistered loader type"
NotImplementedError: Can't perform this operation for unregistered loader type

```

```
python3 -m unittest -v faker.tests
test_add_provider_gives_priority_to_newly_added_provider (faker.tests.FactoryTestCase) ... ok
test_binary (faker.tests.FactoryTestCase) ... ok
test_command (faker.tests.FactoryTestCase) ... ok
test_command_custom_provider (faker.tests.FactoryTestCase) ... ok
test_date_time_between_dates (faker.tests.FactoryTestCase) ... ok
test_date_time_between_dates_with_tzinfo (faker.tests.FactoryTestCase) ... ok
test_date_time_this_period (faker.tests.FactoryTestCase) ... ok
test_date_time_this_period_with_tzinfo (faker.tests.FactoryTestCase) ... ok
test_datetime_safe (faker.tests.FactoryTestCase) ... ok
test_datetimes_with_and_without_tzinfo (faker.tests.FactoryTestCase) ... ok
test_documentor (faker.tests.FactoryTestCase) ... /tmp/faker-0.7.3/faker/documentor.py:51: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
  argspec = inspect.getargspec(method)
ok
test_email (faker.tests.FactoryTestCase) ... ok
test_format_calls_formatter_on_provider (faker.tests.FactoryTestCase) ... ok
test_format_transfers_arguments_to_formatter (faker.tests.FactoryTestCase) ... ok
test_get_formatter_returns_callable (faker.tests.FactoryTestCase) ... ok
test_get_formatter_returns_correct_formatter (faker.tests.FactoryTestCase) ... ok
test_get_formatter_throws_exception_on_incorrect_formatter (faker.tests.FactoryTestCase) ... ok
test_ipv4 (faker.tests.FactoryTestCase) ... ok
test_ipv6 (faker.tests.FactoryTestCase) ... ok
test_language_code (faker.tests.FactoryTestCase) ... ok
test_magic_call_calls_format (faker.tests.FactoryTestCase) ... ok
test_magic_call_calls_format_with_arguments (faker.tests.FactoryTestCase) ... ok
test_no_words_paragraph (faker.tests.FactoryTestCase) ... ok
test_no_words_sentence (faker.tests.FactoryTestCase) ... ok
test_parse_returns_same_string_when_it_contains_no_curly_braces (faker.tests.FactoryTestCase) ... ok
test_parse_returns_string_with_tokens_replaced_by_formatters (faker.tests.FactoryTestCase) ... ok
test_password (faker.tests.FactoryTestCase) ... ok
test_prefix_suffix_always_string (faker.tests.FactoryTestCase) ... ok
test_random_element (faker.tests.FactoryTestCase) ... ok
test_random_pystr_characters (faker.tests.FactoryTestCase) ... ok
test_random_sample_unique (faker.tests.FactoryTestCase) ... ok
test_slugify (faker.tests.FactoryTestCase) ... ok
test_timezone_conversion (faker.tests.FactoryTestCase) ... ok
test_us_ssn_valid (faker.tests.FactoryTestCase) ... ok
test_get_random (faker.tests.GeneratorTestCase) ... ok
test_random_seed_doesnt_seed_system_random (faker.tests.GeneratorTestCase) ... ok
test_add_dicts (faker.tests.UtilsTestCase) ... ok
test_choice_distribution (faker.tests.UtilsTestCase) ... ok
test_find_available_locales (faker.tests.UtilsTestCase) ... ok
test_find_available_providers (faker.tests.UtilsTestCase) ... ok

----------------------------------------------------------------------
Ran 40 tests in 15.249s

OK

```

--- 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 #!/usr/bin/env python
2 # coding=utf-8
3 
4 import os
5 import io
6 
7 from setuptools import setup, find_packages
8 
9 here = os.path.abspath(os.path.dirname(__file__))
10 README = io.open(os.path.join(here, 'README.rst'), encoding="utf8").read()
11 
12 
13 version = '0.7.7'
14 
15 # this module can be zip-safe if the zipimporter implements iter_modules or if
16 # pkgutil.iter_importer_modules has registered a dispatch for the zipimporter.
17 try:
18     import pkgutil
19     import zipimport
20     zip_safe = hasattr(zipimport.zipimporter, "iter_modules") or \
21         zipimport.zipimporter in pkgutil.iter_importer_modules.registry.keys()
22 except (ImportError, AttributeError):
23     zip_safe = False
24 
25 setup(
26     name='Faker',
27     version=version,
28     description="Faker is a Python package that generates fake data for you.",
29     long_description=README,
30     entry_points={
31         'console_scripts': ['faker=faker.cli:execute_from_command_line'],
32     },
33     classifiers=[
34         # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
35         'Development Status :: 3 - Alpha',
36         'Environment :: Console',
37         'Intended Audience :: Developers',
38         'Programming Language :: Python',
39         'Programming Language :: Python :: 2',
40         'Programming Language :: Python :: 2.7',
41         'Programming Language :: Python :: 3',
42         'Programming Language :: Python :: 3.4',
43         'Programming Language :: Python :: 3.5',
44         'Topic :: Software Development :: Libraries :: Python Modules',
45         'Topic :: Software Development :: Testing',
46         'Topic :: Utilities',
47         'License :: OSI Approved :: MIT License'
48     ],
49     keywords='faker fixtures data test mock generator',
50     author='joke2k',
51     author_email='joke2k@gmail.com',
52     url='https://github.com/joke2k/faker',
53     license='MIT License',
54     packages=find_packages(exclude=("docs",)),
55     platforms=["any"],
56     test_suite='faker.tests',
57     zip_safe=zip_safe,
58     install_requires=[
59         "python-dateutil>=2.4",
60         "six",
61     ],
62     extras_require={
63         ':python_version=="2.7"': [
64             'ipaddress',
65         ],
66         ':python_version=="3.0"': [
67             'importlib',
68         ],
69         ':python_version=="3.2"': [
70             'ipaddress',
71         ],
72     }
73 )
74
```
--- 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()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -51,9 +51,9 @@
     author_email='joke2k@gmail.com',
     url='https://github.com/joke2k/faker',
     license='MIT License',
-    packages=find_packages(exclude=("docs",)),
+    packages=find_packages(exclude=("docs", "tests",)),
     platforms=["any"],
-    test_suite='faker.tests',
+    test_suite='tests',
     zip_safe=zip_safe,
     install_requires=[
         "python-dateutil>=2.4",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -51,9 +51,9 @@\n     author_email='joke2k@gmail.com',\n     url='https://github.com/joke2k/faker',\n     license='MIT License',\n-    packages=find_packages(exclude=(\"docs\",)),\n+    packages=find_packages(exclude=(\"docs\", \"tests\",)),\n     platforms=[\"any\"],\n-    test_suite='faker.tests',\n+    test_suite='tests',\n     zip_safe=zip_safe,\n     install_requires=[\n         \"python-dateutil>=2.4\",\n", "issue": "Error in running faker tests\nHi,\r\n\r\nI use ```Python 3.5.2```.\r\n\r\nI downloaded v0.7.3 archive from GH.\r\n\r\nWhen I ran ``` python3 setup.py test```, I get a Fail; when I run ```python3 -m unittest -v faker.tests```, I get 'OK'\r\n\r\nDid I do something the wrong way, since ipaddress is required for python 2.x or python 3.2?\r\n\r\nHere's the full output\r\n\r\n```\r\npython3 setup.py test\r\nrunning test\r\nrunning egg_info\r\ncreating Faker.egg-info\r\nwriting top-level names to Faker.egg-info/top_level.txt\r\nwriting entry points to Faker.egg-info/entry_points.txt\r\nwriting requirements to Faker.egg-info/requires.txt\r\nwriting Faker.egg-info/PKG-INFO\r\nwriting dependency_links to Faker.egg-info/dependency_links.txt\r\nwriting manifest file 'Faker.egg-info/SOURCES.txt'\r\nreading manifest file 'Faker.egg-info/SOURCES.txt'\r\nreading manifest template 'MANIFEST.in'\r\nwarning: no files found matching '*.md'\r\nwriting manifest file 'Faker.egg-info/SOURCES.txt'\r\nrunning build_ext\r\nTraceback (most recent call last):\r\n  File \"setup.py\", line 78, in <module>\r\n    'ipaddress',\r\n  File \"/usr/lib/python3.5/distutils/core.py\", line 148, in setup\r\n    dist.run_commands()\r\n  File \"/usr/lib/python3.5/distutils/dist.py\", line 955, in run_commands\r\n    self.run_command(cmd)\r\n  File \"/usr/lib/python3.5/distutils/dist.py\", line 974, in run_command\r\n    cmd_obj.run()\r\n  File \"/usr/lib/python3.5/site-packages/setuptools/command/test.py\", line 159, in run\r\n    self.with_project_on_sys_path(self.run_tests)\r\n  File \"/usr/lib/python3.5/site-packages/setuptools/command/test.py\", line 140, in with_project_on_sys_path\r\n    func()\r\n  File \"/usr/lib/python3.5/site-packages/setuptools/command/test.py\", line 180, in run_tests\r\n    testRunner=self._resolve_as_ep(self.test_runner),\r\n  File \"/usr/lib/python3.5/unittest/main.py\", line 93, in __init__\r\n    self.parseArgs(argv)\r\n  File \"/usr/lib/python3.5/unittest/main.py\", line 140, in parseArgs\r\n    self.createTests()\r\n  File \"/usr/lib/python3.5/unittest/main.py\", line 147, in createTests\r\n    self.module)\r\n  File \"/usr/lib/python3.5/unittest/loader.py\", line 219, in loadTestsFromNames\r\n    suites = [self.loadTestsFromName(name, module) for name in names]\r\n  File \"/usr/lib/python3.5/unittest/loader.py\", line 219, in <listcomp>\r\n    suites = [self.loadTestsFromName(name, module) for name in names]\r\n  File \"/usr/lib/python3.5/unittest/loader.py\", line 190, in loadTestsFromName\r\n    return self.loadTestsFromModule(obj)\r\n  File \"/usr/lib/python3.5/site-packages/setuptools/command/test.py\", line 30, in loadTestsFromModule\r\n    for file in resource_listdir(module.__name__, ''):\r\n  File \"/usr/lib/python3.5/site-packages/pkg_resources/__init__.py\", line 1170, in resource_listdir\r\n    resource_name\r\n  File \"/usr/lib/python3.5/site-packages/pkg_resources/__init__.py\", line 1466, in resource_listdir\r\n    return self._listdir(self._fn(self.module_path, resource_name))\r\n  File \"/usr/lib/python3.5/site-packages/pkg_resources/__init__.py\", line 1505, in _listdir\r\n    \"Can't perform this operation for unregistered loader type\"\r\nNotImplementedError: Can't perform this operation for unregistered loader type\r\n\r\n```\r\n\r\n```\r\npython3 -m unittest -v faker.tests\r\ntest_add_provider_gives_priority_to_newly_added_provider (faker.tests.FactoryTestCase) ... ok\r\ntest_binary (faker.tests.FactoryTestCase) ... ok\r\ntest_command (faker.tests.FactoryTestCase) ... ok\r\ntest_command_custom_provider (faker.tests.FactoryTestCase) ... ok\r\ntest_date_time_between_dates (faker.tests.FactoryTestCase) ... ok\r\ntest_date_time_between_dates_with_tzinfo (faker.tests.FactoryTestCase) ... ok\r\ntest_date_time_this_period (faker.tests.FactoryTestCase) ... ok\r\ntest_date_time_this_period_with_tzinfo (faker.tests.FactoryTestCase) ... ok\r\ntest_datetime_safe (faker.tests.FactoryTestCase) ... ok\r\ntest_datetimes_with_and_without_tzinfo (faker.tests.FactoryTestCase) ... ok\r\ntest_documentor (faker.tests.FactoryTestCase) ... /tmp/faker-0.7.3/faker/documentor.py:51: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead\r\n  argspec = inspect.getargspec(method)\r\nok\r\ntest_email (faker.tests.FactoryTestCase) ... ok\r\ntest_format_calls_formatter_on_provider (faker.tests.FactoryTestCase) ... ok\r\ntest_format_transfers_arguments_to_formatter (faker.tests.FactoryTestCase) ... ok\r\ntest_get_formatter_returns_callable (faker.tests.FactoryTestCase) ... ok\r\ntest_get_formatter_returns_correct_formatter (faker.tests.FactoryTestCase) ... ok\r\ntest_get_formatter_throws_exception_on_incorrect_formatter (faker.tests.FactoryTestCase) ... ok\r\ntest_ipv4 (faker.tests.FactoryTestCase) ... ok\r\ntest_ipv6 (faker.tests.FactoryTestCase) ... ok\r\ntest_language_code (faker.tests.FactoryTestCase) ... ok\r\ntest_magic_call_calls_format (faker.tests.FactoryTestCase) ... ok\r\ntest_magic_call_calls_format_with_arguments (faker.tests.FactoryTestCase) ... ok\r\ntest_no_words_paragraph (faker.tests.FactoryTestCase) ... ok\r\ntest_no_words_sentence (faker.tests.FactoryTestCase) ... ok\r\ntest_parse_returns_same_string_when_it_contains_no_curly_braces (faker.tests.FactoryTestCase) ... ok\r\ntest_parse_returns_string_with_tokens_replaced_by_formatters (faker.tests.FactoryTestCase) ... ok\r\ntest_password (faker.tests.FactoryTestCase) ... ok\r\ntest_prefix_suffix_always_string (faker.tests.FactoryTestCase) ... ok\r\ntest_random_element (faker.tests.FactoryTestCase) ... ok\r\ntest_random_pystr_characters (faker.tests.FactoryTestCase) ... ok\r\ntest_random_sample_unique (faker.tests.FactoryTestCase) ... ok\r\ntest_slugify (faker.tests.FactoryTestCase) ... ok\r\ntest_timezone_conversion (faker.tests.FactoryTestCase) ... ok\r\ntest_us_ssn_valid (faker.tests.FactoryTestCase) ... ok\r\ntest_get_random (faker.tests.GeneratorTestCase) ... ok\r\ntest_random_seed_doesnt_seed_system_random (faker.tests.GeneratorTestCase) ... ok\r\ntest_add_dicts (faker.tests.UtilsTestCase) ... ok\r\ntest_choice_distribution (faker.tests.UtilsTestCase) ... ok\r\ntest_find_available_locales (faker.tests.UtilsTestCase) ... ok\r\ntest_find_available_providers (faker.tests.UtilsTestCase) ... ok\r\n\r\n----------------------------------------------------------------------\r\nRan 40 tests in 15.249s\r\n\r\nOK\r\n\r\n```\n", "before_files": [{"content": "#!/usr/bin/env python\n# coding=utf-8\n\nimport os\nimport io\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = io.open(os.path.join(here, 'README.rst'), encoding=\"utf8\").read()\n\n\nversion = '0.7.7'\n\n# this module can be zip-safe if the zipimporter implements iter_modules or if\n# pkgutil.iter_importer_modules has registered a dispatch for the zipimporter.\ntry:\n    import pkgutil\n    import zipimport\n    zip_safe = hasattr(zipimport.zipimporter, \"iter_modules\") or \\\n        zipimport.zipimporter in pkgutil.iter_importer_modules.registry.keys()\nexcept (ImportError, AttributeError):\n    zip_safe = False\n\nsetup(\n    name='Faker',\n    version=version,\n    description=\"Faker is a Python package that generates fake data for you.\",\n    long_description=README,\n    entry_points={\n        'console_scripts': ['faker=faker.cli:execute_from_command_line'],\n    },\n    classifiers=[\n        # See https://pypi.python.org/pypi?%3Aaction=list_classifiers\n        'Development Status :: 3 - Alpha',\n        'Environment :: Console',\n        'Intended Audience :: Developers',\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        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Software Development :: Testing',\n        'Topic :: Utilities',\n        'License :: OSI Approved :: MIT License'\n    ],\n    keywords='faker fixtures data test mock generator',\n    author='joke2k',\n    author_email='joke2k@gmail.com',\n    url='https://github.com/joke2k/faker',\n    license='MIT License',\n    packages=find_packages(exclude=(\"docs\",)),\n    platforms=[\"any\"],\n    test_suite='faker.tests',\n    zip_safe=zip_safe,\n    install_requires=[\n        \"python-dateutil>=2.4\",\n        \"six\",\n    ],\n    extras_require={\n        ':python_version==\"2.7\"': [\n            'ipaddress',\n        ],\n        ':python_version==\"3.0\"': [\n            'importlib',\n        ],\n        ':python_version==\"3.2\"': [\n            'ipaddress',\n        ],\n    }\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# coding=utf-8\n\nimport os\nimport io\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = io.open(os.path.join(here, 'README.rst'), encoding=\"utf8\").read()\n\n\nversion = '0.7.7'\n\n# this module can be zip-safe if the zipimporter implements iter_modules or if\n# pkgutil.iter_importer_modules has registered a dispatch for the zipimporter.\ntry:\n    import pkgutil\n    import zipimport\n    zip_safe = hasattr(zipimport.zipimporter, \"iter_modules\") or \\\n        zipimport.zipimporter in pkgutil.iter_importer_modules.registry.keys()\nexcept (ImportError, AttributeError):\n    zip_safe = False\n\nsetup(\n    name='Faker',\n    version=version,\n    description=\"Faker is a Python package that generates fake data for you.\",\n    long_description=README,\n    entry_points={\n        'console_scripts': ['faker=faker.cli:execute_from_command_line'],\n    },\n    classifiers=[\n        # See https://pypi.python.org/pypi?%3Aaction=list_classifiers\n        'Development Status :: 3 - Alpha',\n        'Environment :: Console',\n        'Intended Audience :: Developers',\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        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Software Development :: Testing',\n        'Topic :: Utilities',\n        'License :: OSI Approved :: MIT License'\n    ],\n    keywords='faker fixtures data test mock generator',\n    author='joke2k',\n    author_email='joke2k@gmail.com',\n    url='https://github.com/joke2k/faker',\n    license='MIT License',\n    packages=find_packages(exclude=(\"docs\", \"tests\",)),\n    platforms=[\"any\"],\n    test_suite='tests',\n    zip_safe=zip_safe,\n    install_requires=[\n        \"python-dateutil>=2.4\",\n        \"six\",\n    ],\n    extras_require={\n        ':python_version==\"2.7\"': [\n            'ipaddress',\n        ],\n        ':python_version==\"3.0\"': [\n            'importlib',\n        ],\n        ':python_version==\"3.2\"': [\n            'ipaddress',\n        ],\n    }\n)\n", "path": "setup.py"}]}