naiquevin/pipdeptree — pull request #6 by msabramo (2014-06-12 21:43:24+00:00)
Title: Switch from nose to pytest

Nicer output when asserts fail:

```
❯ tox -e py27
GLOB sdist-make: /Users/marca/dev/git-repos/pipdeptree/setup.py
py27 inst-nodeps: /Users/marca/dev/git-repos/pipdeptree/.tox/dist/pipdeptree-0.3.zip
py27 runtests: commands[0] | py.test --cov pipdeptree --cov-report xml --cov-report html --cov-report term-missing tests/
============================================================================= test session starts ==============================================================================
platform darwin -- Python 2.7.6 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items

tests/test_pipdeptree.py FFFFF

=================================================================================== FAILURES ===================================================================================
_______________________________________________________________________________ test_req_version _______________________________________________________________________________
tests/test_pipdeptree.py:28: in test_req_version
> sqlalchemy = find_req('sqlalchemy', 'alembic')
tests/test_pipdeptree.py:24: in find_req
> return [r for r in pkg_index[parent].requires() if r.key == req][0]
E IndexError: list index out of range
____________________________________________________________________________ test_non_top_pkg_name _____________________________________________________________________________
tests/test_pipdeptree.py:36: in test_non_top_pkg_name
> flask_r = find_req('flask', 'flask-script')
tests/test_pipdeptree.py:24: in find_req
> return [r for r in pkg_index[parent].requires() if r.key == req][0]
E IndexError: list index out of range
__________________________________________________________________________ test_render_tree_only_top ___________________________________________________________________________
tests/test_pipdeptree.py:52: in test_render_tree_only_top
> assert ' - SQLAlchemy [required: >=0.7.3, installed: 0.9.1]' in lines
E assert ' - SQLAlchemy [required: >=0.7.3, installed: 0.9.1]' in set(['Flask-Script==0.6.6', 'Flask==0.10.1', 'Jinja2==2.7.2', 'Lookupy==0.1', 'Mako==0.9.1', 'MarkupSafe==0.18', ...])
__________________________________________________________________________ test_render_tree_list_all ___________________________________________________________________________
tests/test_pipdeptree.py:62: in test_render_tree_list_all
> assert ' - SQLAlchemy [required: >=0.7.3, installed: 0.9.1]' in lines
E assert ' - SQLAlchemy [required: >=0.7.3, installed: 0.9.1]' in set(['Flask-Script==0.6.6', 'Flask==0.10.1', 'Jinja2==2.7.2', 'Lookupy==0.1', 'Mako==0.9.1', 'MarkupSafe==0.18', ...])
___________________________________________________________________________ test_render_tree_freeze ____________________________________________________________________________
tests/test_pipdeptree.py:72: in test_render_tree_freeze
> assert ' - SQLAlchemy==0.9.1' in lines
E assert ' - SQLAlchemy==0.9.1' in set(['Flask-Script==0.6.6', 'Flask==0.10.1', 'Jinja2==2.7.2', 'Lookupy==0.1', 'Mako==0.9.1', 'MarkupSafe==0.18', ...])
--------------------------------------------------------------- coverage: platform darwin, python 2.7.6-final-0 ----------------------------------------------------------------
Name Stmts Miss Cover Missing
--------------------------------------------------------------------------------
.tox/py27/lib/python2.7/site-packages/pipdeptree 83 51 39% 21, 52-61, 86, 90-91, 104-108, 142-147, 164-217, 221
Coverage HTML written to dir htmlcov
Coverage XML written to file coverage.xml
=========================================================================== short test summary info ============================================================================
FAIL tests/test_pipdeptree.py::test_req_version
FAIL tests/test_pipdeptree.py::test_non_top_pkg_name
FAIL tests/test_pipdeptree.py::test_render_tree_only_top
FAIL tests/test_pipdeptree.py::test_render_tree_list_all
FAIL tests/test_pipdeptree.py::test_render_tree_freeze
=========================================================================== 5 failed in 1.24 seconds ===========================================================================
ERROR: InvocationError: '/Users/marca/dev/git-repos/pipdeptree/.tox/py27/bin/py.test --cov pipdeptree --cov-report xml --cov-report html --cov-report term-missing tests/'
___________________________________________________________________________________ summary ____________________________________________________________________________________
ERROR: py27: commands failed
```

Also more actively maintained and more flexible (e.g.: fixtures,
conftest.py)