Align unittests to new function signatures.
This commit is contained in:
parent
6f7909bd5d
commit
b4f0a7be07
|
@ -97,8 +97,8 @@ def test_ReqPackage_render_as_branch():
|
|||
assert mks2.render_as_branch(True) == 'MarkupSafe==0.18'
|
||||
|
||||
|
||||
def test_render_tree_only_top():
|
||||
tree_str = render_tree(tree, list_all=False)
|
||||
def test_render_tree():
|
||||
tree_str = render_tree(tree)
|
||||
lines = set(tree_str.split('\n'))
|
||||
assert 'Flask-Script==0.6.6' in lines
|
||||
assert ' - SQLAlchemy [required: >=0.7.3, installed: 0.9.1]' in lines
|
||||
|
@ -106,17 +106,8 @@ def test_render_tree_only_top():
|
|||
assert 'itsdangerous==0.23' not in lines
|
||||
|
||||
|
||||
def test_render_tree_list_all():
|
||||
tree_str = render_tree(tree, list_all=True)
|
||||
lines = set(tree_str.split('\n'))
|
||||
assert 'Flask-Script==0.6.6' in lines
|
||||
assert ' - SQLAlchemy [required: >=0.7.3, installed: 0.9.1]' in lines
|
||||
assert 'Lookupy==0.1' in lines
|
||||
assert 'itsdangerous==0.23' in lines
|
||||
|
||||
|
||||
def test_render_tree_freeze():
|
||||
tree_str = render_tree(tree, list_all=False, frozen=True)
|
||||
tree_str = render_tree(tree, frozen=True)
|
||||
lines = set()
|
||||
for line in tree_str.split('\n'):
|
||||
# Workaround for https://github.com/pypa/pip/issues/1867
|
||||
|
@ -144,7 +135,7 @@ def test_cyclic_dependencies():
|
|||
|
||||
def test_render_tree_cyclic_dependency():
|
||||
cyclic_pkgs, dist_index, tree = venv_fixture('tests/virtualenvs/cyclicenv.pickle')
|
||||
tree_str = render_tree(tree, list_all=True)
|
||||
tree_str = render_tree(tree)
|
||||
lines = set(tree_str.split('\n'))
|
||||
assert 'CircularDependencyA==0.0.0' in lines
|
||||
assert ' - CircularDependencyB [required: Any, installed: 0.0.0]' in lines
|
||||
|
@ -154,7 +145,7 @@ def test_render_tree_cyclic_dependency():
|
|||
|
||||
def test_render_tree_freeze_cyclic_dependency():
|
||||
cyclic_pkgs, dist_index, tree = venv_fixture('tests/virtualenvs/cyclicenv.pickle')
|
||||
tree_str = render_tree(tree, list_all=True, frozen=True)
|
||||
tree_str = render_tree(tree, frozen=True)
|
||||
lines = set(tree_str.split('\n'))
|
||||
assert 'CircularDependencyA==0.0.0' in lines
|
||||
assert ' CircularDependencyB==0.0.0' in lines
|
||||
|
|
Loading…
Reference in New Issue