Add test_render_tree_cyclic_dependency
Test for issue in #13 (https://github.com/naiquevin/pipdeptree/issues/13)
This commit is contained in:
parent
c0200e1d6c
commit
b6eea3084a
|
@ -0,0 +1,85 @@
|
|||
(lp0
|
||||
ccopy_reg
|
||||
_reconstructor
|
||||
p1
|
||||
(cpip._vendor.pkg_resources
|
||||
Distribution
|
||||
p2
|
||||
c__builtin__
|
||||
object
|
||||
p3
|
||||
Ntp4
|
||||
Rp5
|
||||
(dp6
|
||||
S'project_name'
|
||||
p7
|
||||
S'CircularDependencyA'
|
||||
p8
|
||||
sS'precedence'
|
||||
p9
|
||||
I-1
|
||||
sS'_key'
|
||||
p10
|
||||
S'circulardependencya'
|
||||
p11
|
||||
sS'_version'
|
||||
p12
|
||||
S'0.0.0'
|
||||
p13
|
||||
sS'platform'
|
||||
p14
|
||||
NsS'location'
|
||||
p15
|
||||
S'.tox/cyclic_deps/lib/python2.7/site-packages'
|
||||
p16
|
||||
sS'py_version'
|
||||
p17
|
||||
S'2.7'
|
||||
p18
|
||||
sS'_provider'
|
||||
p19
|
||||
(ipip._vendor.pkg_resources
|
||||
PathMetadata
|
||||
p20
|
||||
(dp21
|
||||
S'module_path'
|
||||
p22
|
||||
g16
|
||||
sS'egg_info'
|
||||
p23
|
||||
S'.tox/cyclic_deps/lib/python2.7/site-packages/CircularDependencyA-0.0.0-py2.7.egg-info'
|
||||
p24
|
||||
sbsbag1
|
||||
(g2
|
||||
g3
|
||||
Ntp25
|
||||
Rp26
|
||||
(dp27
|
||||
g7
|
||||
S'CircularDependencyB'
|
||||
p28
|
||||
sg9
|
||||
I-1
|
||||
sg10
|
||||
S'circulardependencyb'
|
||||
p29
|
||||
sg12
|
||||
S'0.0.0'
|
||||
p30
|
||||
sg14
|
||||
Nsg15
|
||||
g16
|
||||
sg17
|
||||
S'2.7'
|
||||
p31
|
||||
sg19
|
||||
(ipip._vendor.pkg_resources
|
||||
PathMetadata
|
||||
p32
|
||||
(dp33
|
||||
g22
|
||||
g16
|
||||
sg23
|
||||
S'.tox/cyclic_deps/lib/python2.7/site-packages/CircularDependencyB-0.0.0-py2.7.egg-info'
|
||||
p34
|
||||
sbsba.
|
|
@ -79,3 +79,33 @@ def test_render_tree_freeze():
|
|||
assert ' - SQLAlchemy==0.9.1' in lines
|
||||
assert '-e git+https://github.com/naiquevin/lookupy.git@cdbe30c160e1c29802df75e145ea4ad903c05386#egg=Lookupy-master' in lines
|
||||
assert 'itsdangerous==0.23' not in lines
|
||||
|
||||
|
||||
def test_render_tree_cyclic_dependency():
|
||||
with open('tests/cyclic_deps.pickle', 'rb') as f:
|
||||
cyclic_pkgs = pickle.load(f)
|
||||
|
||||
list_all = True
|
||||
|
||||
tree_str = render_tree(cyclic_pkgs, pkg_index, req_map, list_all,
|
||||
top_pkg_name, non_top_pkg_name)
|
||||
lines = set(tree_str.split('\n'))
|
||||
assert 'CircularDependencyA==0.0.0' in lines
|
||||
assert ' - CircularDependencyB [installed: 0.0.0]' in lines
|
||||
assert 'CircularDependencyB==0.0.0' in lines
|
||||
assert ' - CircularDependencyA [installed: 0.0.0]' in lines
|
||||
|
||||
|
||||
def test_render_tree_freeze_cyclic_dependency():
|
||||
with open('tests/cyclic_deps.pickle', 'rb') as f:
|
||||
cyclic_pkgs = pickle.load(f)
|
||||
|
||||
list_all = True
|
||||
|
||||
tree_str = render_tree(cyclic_pkgs, pkg_index, req_map, list_all,
|
||||
top_pkg_src, non_top_pkg_src)
|
||||
lines = set(tree_str.split('\n'))
|
||||
assert 'CircularDependencyA==0.0.0' in lines
|
||||
assert ' - CircularDependencyB==0.0.0' in lines
|
||||
assert 'CircularDependencyB==0.0.0' in lines
|
||||
assert ' - CircularDependencyA==0.0.0' in lines
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
CircularDependencyA
|
||||
CircularDependencyB
|
|
@ -0,0 +1,65 @@
|
|||
# Jinja2==2.7.3
|
||||
# Mako==0.9.1
|
||||
# MarkupSafe==0.23
|
||||
# Paste==1.7.5.1
|
||||
# PasteDeploy==1.5.2
|
||||
# PasteScript==1.7.5
|
||||
# PyYAML==3.10
|
||||
# Pygments==1.6
|
||||
RAttr==0.6.2
|
||||
# SQLAlchemy==0.9.4
|
||||
WebOb==1.4
|
||||
# WebTest==2.0.15
|
||||
# alembic==0.6.5dev
|
||||
# argparse==1.2.1
|
||||
# beautifulsoup4==4.3.2
|
||||
# colorama==0.3.1
|
||||
# contextdecorator==0.10.0
|
||||
cornice==0.16.2
|
||||
# cov-core==1.12
|
||||
# coverage==3.7.1
|
||||
# decorator==3.4.0
|
||||
# dogpile.cache==0.5.3
|
||||
# dogpile.core==0.4.1
|
||||
# fancycompleter==0.4
|
||||
# gevent==1.0.1
|
||||
# greenlet==0.4.2
|
||||
# gunicorn==19.0.0
|
||||
# jsonschema==2.3.0
|
||||
# mock==1.0.1
|
||||
# msgpack-python==0.4.0
|
||||
# nose==1.3.3
|
||||
# parameterizedtestcase==0.1.0
|
||||
# pdbpp==0.7.2
|
||||
pipdeptree==0.3
|
||||
# py==1.4.18
|
||||
# pylibmc==1.2.3
|
||||
# pymssql==2.1.0
|
||||
pyramid==1.5.1
|
||||
pyramid-jinja2==2.3
|
||||
# pyrepl==0.8.4
|
||||
# pytest==2.4.2
|
||||
# pytest-cov==1.6
|
||||
# redis==2.9.1
|
||||
# repoze.lru==0.6
|
||||
# requests==2.2.1
|
||||
# simplejson==3.3.0
|
||||
# six==1.6.1
|
||||
smlib.appstatus==0.0.13
|
||||
smlib.cache==1.0.7
|
||||
smlib.enums==0.0.4
|
||||
smlib.log==0.0.7
|
||||
smlib.service==0.1.33
|
||||
# smlib.smsqlalchemy==0.13
|
||||
smlib.traceback==0.3
|
||||
smlib.validate==0.0.10
|
||||
smsdk.authsvc==0.0.8
|
||||
smsdk.usersvc==0.0.8
|
||||
translationstring==1.1
|
||||
# vcrpy==0.7.0
|
||||
# venusian==1.0a8
|
||||
# waitress==0.8.8
|
||||
# wmctrl==0.1
|
||||
# wsgiref==0.1.2
|
||||
# zope.deprecation==4.1.1
|
||||
# zope.interface==4.1.1
|
Loading…
Reference in New Issue