test_install_without_dev: Replace pytz with tablib

pytz exists in the build environment, which will typically
be added to the PYTHONPATH when running the tests in rpmbuild.
The alternative is to create a virtualenv containing only the
pipenv dependencies, which is cumbersome to do when devendoring.
As the pytz library here is not critical to the logic of the
test method, replace it with tablib to reduce unintentionally
errors when packaging.

Continuation of https://github.com/pypa/pipenv/issues/3644
This commit is contained in:
John Vandenberg
2019-04-05 01:23:28 +07:00
parent 9869fcfffa
commit 2f5150ab29
+4 -4
View File
@@ -122,16 +122,16 @@ def test_install_without_dev(PipenvInstance):
six = "*"
[dev-packages]
pytz = "*"
tablib = "*"
""".strip()
f.write(contents)
c = p.pipenv("install")
assert c.return_code == 0
assert "six" in p.pipfile["packages"]
assert "pytz" in p.pipfile["dev-packages"]
assert "tablib" in p.pipfile["dev-packages"]
assert "six" in p.lockfile["default"]
assert "pytz" in p.lockfile["develop"]
c = p.pipenv('run python -c "import pytz"')
assert "tablib" in p.lockfile["develop"]
c = p.pipenv('run python -c "import tablib"')
assert c.return_code != 0
c = p.pipenv('run python -c "import six"')
assert c.return_code == 0