update tests to remove False key during comparison

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2018-05-04 16:01:16 -04:00
parent 08f61e7684
commit f6cff554f4
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -717,7 +717,7 @@ def convert_deps_to_pip(deps, project=None, r=True, include_index=False):
vcs = maybe_vcs[0] if maybe_vcs else None
if not any(key in deps[dep] for key in ['path', 'vcs', 'file']):
extra += extras
if not isinstance(deps[dep], Mapping):
if isinstance(deps[dep], Mapping):
editable = bool(deps[dep].get('editable', False))
# Support for files.
if 'file' in deps[dep]:
+4 -3
View File
@@ -2,7 +2,7 @@
import os
import pytest
from mock import patch, Mock
from first import first
import pipenv.utils
@@ -110,8 +110,9 @@ def test_convert_deps_to_pip_unicode():
@pytest.mark.parametrize('expected, requirement', DEP_PIP_PAIRS)
def test_convert_from_pip(expected, requirement):
# We don't build requirements back up with the editable key, so lets drop it out
if 'requests' in expected and expected['requests'].get('editable', '') == 'false':
del expected['requests']['editable']
package = first(expected.keys())
if hasattr(expected[package], 'keys') and expected[package].get('editable') is False:
del expected[package]['editable']
assert pipenv.utils.convert_deps_from_pip(requirement) == expected