We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Test Deploy feature is broken
# Description

See https://github.com/FaradayRF/faradayio/issues/35 for a related issue - I think. Failing job on master here: https://travis-ci.org/diana-hep/pyhf/builds/517678508?utm_source=github_status&utm_medium=notification

# Expected Behavior

Expect it to pass.

# Actual Behavior

Observe it failing.

# Checklist

- [x] Run `git fetch` to get the most up to date version of `master`
- [x] Searched through existing Issues to confirm this is not a duplicate issue
- [x] Filled out the Description, Expected Behavior, Actual Behavior, and Steps to Reproduce sections above or have edited/removed them in a way that fully describes the issue


--- 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 
3 from setuptools import setup, find_packages
4 from os import path
5 import sys
6 
7 this_directory = path.abspath(path.dirname(__file__))
8 if sys.version_info.major < 3:
9     from io import open
10 with open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:
11     long_description = readme_md.read()
12 
13 extras_require = {
14     'tensorflow': [
15         'tensorflow~=1.13',
16         'tensorflow-probability~=0.5',
17         'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass
18         'setuptools<=39.1.0',
19     ],
20     'torch': ['torch~=1.0'],
21     'mxnet': ['mxnet~=1.0', 'requests~=2.18.4', 'numpy<1.15.0,>=1.8.2'],
22     # 'dask': [
23     #     'dask[array]'
24     # ],
25     'xmlio': ['uproot'],
26     'minuit': ['iminuit'],
27     'develop': [
28         'pyflakes',
29         'pytest~=3.5',
30         'pytest-cov>=2.5.1',
31         'pytest-mock',
32         'pytest-benchmark[histogram]',
33         'pytest-console-scripts',
34         'python-coveralls',
35         'coverage>=4.0',  # coveralls
36         'matplotlib',
37         'jupyter',
38         'nbdime',
39         'uproot~=3.3',
40         'papermill~=0.16',
41         'graphviz',
42         'bumpversion',
43         'sphinx',
44         'sphinxcontrib-bibtex',
45         'sphinxcontrib-napoleon',
46         'sphinx_rtd_theme',
47         'nbsphinx',
48         'sphinx-issues',
49         'm2r',
50         'jsonpatch',
51         'ipython<7',  # jupyter_console and ipython clash in dependency requirement -- downgrade ipython for now
52         'pre-commit',
53         'black;python_version>="3.6"',  # Black is Python3 only
54         'twine',
55     ],
56 }
57 extras_require['complete'] = sorted(set(sum(extras_require.values(), [])))
58 
59 setup(
60     name='pyhf',
61     version='0.0.16',
62     description='(partial) pure python histfactory implementation',
63     long_description=long_description,
64     long_description_content_type='text/markdown',
65     url='https://github.com/diana-hep/pyhf',
66     author='Lukas Heinrich',
67     author_email='lukas.heinrich@cern.ch',
68     license='Apache',
69     keywords='physics fitting numpy scipy tensorflow pytorch mxnet dask',
70     classifiers=[
71         "Programming Language :: Python :: 2",
72         "Programming Language :: Python :: 2.7",
73         "Programming Language :: Python :: 3",
74         "Programming Language :: Python :: 3.6",
75         "Programming Language :: Python :: 3.7",
76     ],
77     packages=find_packages(),
78     include_package_data=True,
79     python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
80     install_requires=[
81         'scipy',  # requires numpy, which is required by pyhf, tensorflow, and mxnet
82         'click>=6.0',  # for console scripts,
83         'tqdm',  # for readxml
84         'six',  # for modifiers
85         'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6
86         'jsonpatch',
87     ],
88     extras_require=extras_require,
89     entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},
90     dependency_links=[],
91 )
92
```
--- 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
@@ -56,6 +56,29 @@
 }
 extras_require['complete'] = sorted(set(sum(extras_require.values(), [])))
 
+
+def _is_test_pypi():
+    """
+    Determine if the Travis CI environment has TESTPYPI_UPLOAD defined and
+    set to true (c.f. .travis.yml)
+
+    The use_scm_version kwarg accepts a callable for the local_scheme
+    configuration parameter with argument "version". This can be replaced
+    with a lambda as the desired version structure is {next_version}.dev{distance}
+    c.f. https://github.com/pypa/setuptools_scm/#importing-in-setuppy
+
+    As the scm versioning is only desired for TestPyPI, for depolyment to PyPI the version
+    controlled through bumpversion is used.
+    """
+    from os import getenv
+
+    return (
+        {'local_scheme': lambda version: ''}
+        if getenv('TESTPYPI_UPLOAD') == 'true'
+        else False
+    )
+
+
 setup(
     name='pyhf',
     version='0.0.16',
@@ -88,4 +111,5 @@
     extras_require=extras_require,
     entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},
     dependency_links=[],
+    use_scm_version=_is_test_pypi(),
 )

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -56,6 +56,29 @@\n }\n extras_require['complete'] = sorted(set(sum(extras_require.values(), [])))\n \n+\n+def _is_test_pypi():\n+    \"\"\"\n+    Determine if the Travis CI environment has TESTPYPI_UPLOAD defined and\n+    set to true (c.f. .travis.yml)\n+\n+    The use_scm_version kwarg accepts a callable for the local_scheme\n+    configuration parameter with argument \"version\". This can be replaced\n+    with a lambda as the desired version structure is {next_version}.dev{distance}\n+    c.f. https://github.com/pypa/setuptools_scm/#importing-in-setuppy\n+\n+    As the scm versioning is only desired for TestPyPI, for depolyment to PyPI the version\n+    controlled through bumpversion is used.\n+    \"\"\"\n+    from os import getenv\n+\n+    return (\n+        {'local_scheme': lambda version: ''}\n+        if getenv('TESTPYPI_UPLOAD') == 'true'\n+        else False\n+    )\n+\n+\n setup(\n     name='pyhf',\n     version='0.0.16',\n@@ -88,4 +111,5 @@\n     extras_require=extras_require,\n     entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},\n     dependency_links=[],\n+    use_scm_version=_is_test_pypi(),\n )\n", "issue": "Test Deploy feature is broken\n# Description\r\n\r\nSee https://github.com/FaradayRF/faradayio/issues/35 for a related issue - I think. Failing job on master here: https://travis-ci.org/diana-hep/pyhf/builds/517678508?utm_source=github_status&utm_medium=notification\r\n\r\n# Expected Behavior\r\n\r\nExpect it to pass.\r\n\r\n# Actual Behavior\r\n\r\nObserve it failing.\r\n\r\n# Checklist\r\n\r\n- [x] Run `git fetch` to get the most up to date version of `master`\r\n- [x] Searched through existing Issues to confirm this is not a duplicate issue\r\n- [x] Filled out the Description, Expected Behavior, Actual Behavior, and Steps to Reproduce sections above or have edited/removed them in a way that fully describes the issue\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom os import path\nimport sys\n\nthis_directory = path.abspath(path.dirname(__file__))\nif sys.version_info.major < 3:\n    from io import open\nwith open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:\n    long_description = readme_md.read()\n\nextras_require = {\n    'tensorflow': [\n        'tensorflow~=1.13',\n        'tensorflow-probability~=0.5',\n        'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass\n        'setuptools<=39.1.0',\n    ],\n    'torch': ['torch~=1.0'],\n    'mxnet': ['mxnet~=1.0', 'requests~=2.18.4', 'numpy<1.15.0,>=1.8.2'],\n    # 'dask': [\n    #     'dask[array]'\n    # ],\n    'xmlio': ['uproot'],\n    'minuit': ['iminuit'],\n    'develop': [\n        'pyflakes',\n        'pytest~=3.5',\n        'pytest-cov>=2.5.1',\n        'pytest-mock',\n        'pytest-benchmark[histogram]',\n        'pytest-console-scripts',\n        'python-coveralls',\n        'coverage>=4.0',  # coveralls\n        'matplotlib',\n        'jupyter',\n        'nbdime',\n        'uproot~=3.3',\n        'papermill~=0.16',\n        'graphviz',\n        'bumpversion',\n        'sphinx',\n        'sphinxcontrib-bibtex',\n        'sphinxcontrib-napoleon',\n        'sphinx_rtd_theme',\n        'nbsphinx',\n        'sphinx-issues',\n        'm2r',\n        'jsonpatch',\n        'ipython<7',  # jupyter_console and ipython clash in dependency requirement -- downgrade ipython for now\n        'pre-commit',\n        'black;python_version>=\"3.6\"',  # Black is Python3 only\n        'twine',\n    ],\n}\nextras_require['complete'] = sorted(set(sum(extras_require.values(), [])))\n\nsetup(\n    name='pyhf',\n    version='0.0.16',\n    description='(partial) pure python histfactory implementation',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    url='https://github.com/diana-hep/pyhf',\n    author='Lukas Heinrich',\n    author_email='lukas.heinrich@cern.ch',\n    license='Apache',\n    keywords='physics fitting numpy scipy tensorflow pytorch mxnet dask',\n    classifiers=[\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    packages=find_packages(),\n    include_package_data=True,\n    python_requires=\">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*\",\n    install_requires=[\n        'scipy',  # requires numpy, which is required by pyhf, tensorflow, and mxnet\n        'click>=6.0',  # for console scripts,\n        'tqdm',  # for readxml\n        'six',  # for modifiers\n        'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6\n        'jsonpatch',\n    ],\n    extras_require=extras_require,\n    entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},\n    dependency_links=[],\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom os import path\nimport sys\n\nthis_directory = path.abspath(path.dirname(__file__))\nif sys.version_info.major < 3:\n    from io import open\nwith open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:\n    long_description = readme_md.read()\n\nextras_require = {\n    'tensorflow': [\n        'tensorflow~=1.13',\n        'tensorflow-probability~=0.5',\n        'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass\n        'setuptools<=39.1.0',\n    ],\n    'torch': ['torch~=1.0'],\n    'mxnet': ['mxnet~=1.0', 'requests~=2.18.4', 'numpy<1.15.0,>=1.8.2'],\n    # 'dask': [\n    #     'dask[array]'\n    # ],\n    'xmlio': ['uproot'],\n    'minuit': ['iminuit'],\n    'develop': [\n        'pyflakes',\n        'pytest~=3.5',\n        'pytest-cov>=2.5.1',\n        'pytest-mock',\n        'pytest-benchmark[histogram]',\n        'pytest-console-scripts',\n        'python-coveralls',\n        'coverage>=4.0',  # coveralls\n        'matplotlib',\n        'jupyter',\n        'nbdime',\n        'uproot~=3.3',\n        'papermill~=0.16',\n        'graphviz',\n        'bumpversion',\n        'sphinx',\n        'sphinxcontrib-bibtex',\n        'sphinxcontrib-napoleon',\n        'sphinx_rtd_theme',\n        'nbsphinx',\n        'sphinx-issues',\n        'm2r',\n        'jsonpatch',\n        'ipython<7',  # jupyter_console and ipython clash in dependency requirement -- downgrade ipython for now\n        'pre-commit',\n        'black;python_version>=\"3.6\"',  # Black is Python3 only\n        'twine',\n    ],\n}\nextras_require['complete'] = sorted(set(sum(extras_require.values(), [])))\n\n\ndef _is_test_pypi():\n    \"\"\"\n    Determine if the Travis CI environment has TESTPYPI_UPLOAD defined and\n    set to true (c.f. .travis.yml)\n\n    The use_scm_version kwarg accepts a callable for the local_scheme\n    configuration parameter with argument \"version\". This can be replaced\n    with a lambda as the desired version structure is {next_version}.dev{distance}\n    c.f. https://github.com/pypa/setuptools_scm/#importing-in-setuppy\n\n    As the scm versioning is only desired for TestPyPI, for depolyment to PyPI the version\n    controlled through bumpversion is used.\n    \"\"\"\n    from os import getenv\n\n    return (\n        {'local_scheme': lambda version: ''}\n        if getenv('TESTPYPI_UPLOAD') == 'true'\n        else False\n    )\n\n\nsetup(\n    name='pyhf',\n    version='0.0.16',\n    description='(partial) pure python histfactory implementation',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    url='https://github.com/diana-hep/pyhf',\n    author='Lukas Heinrich',\n    author_email='lukas.heinrich@cern.ch',\n    license='Apache',\n    keywords='physics fitting numpy scipy tensorflow pytorch mxnet dask',\n    classifiers=[\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    packages=find_packages(),\n    include_package_data=True,\n    python_requires=\">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*\",\n    install_requires=[\n        'scipy',  # requires numpy, which is required by pyhf, tensorflow, and mxnet\n        'click>=6.0',  # for console scripts,\n        'tqdm',  # for readxml\n        'six',  # for modifiers\n        'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6\n        'jsonpatch',\n    ],\n    extras_require=extras_require,\n    entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},\n    dependency_links=[],\n    use_scm_version=_is_test_pypi(),\n)\n", "path": "setup.py"}]}