diff --git a/.travis.yml b/.travis.yml index 7474f84..0364beb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ install: - python setup.py install - pip install -r requirements.txt --use-mirrors # command to run tests -script: nosetests tests +script: p.test -q --tb native -s tests diff --git a/Makefile b/Makefile index 6a237de..e30f152 100644 --- a/Makefile +++ b/Makefile @@ -3,17 +3,21 @@ WD := $(shell pwd) PY := bin/python PIP := bin/pip PEP8 := bin/pep8 -NOSE := bin/nosetests +PYTEST := bin/py.test # ########### # Tests rule! # ########### .PHONY: test -test: venv develop $(NOSE) - $(NOSE) -s tests +test: venv develop $(PYTEST) + $(PYTEST) -q --tb native -s tests -$(NOSE): - $(PIP) install nose nose-selecttests pep8 pylint coverage +.PHONY: test-coverage +test-coverage: venv develop $(PYTEST) + $(PYTEST) -q --cov breadability tests + +$(PYTEST): + $(PIP) install -r requirements.txt # ####### # INSTALL @@ -42,8 +46,8 @@ lib/python*/site-packages/breadability.egg-link: # ########### # Development # ########### -.PHONY: clean_all -clean_all: clean_venv +.PHONY: clean-all +clean-all: clean_venv if [ -d dist ]; then \ rm -r dist; \ fi diff --git a/requirements.txt b/requirements.txt index 0f19c68..8b567f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ docopt>=0.6.1,<0.7 chardet lxml -nose-selecttests -pylint +pytest +pytest-cov coverage -nose +pylint pep8 diff --git a/setup.py b/setup.py index f41b868..3c6acd0 100644 --- a/setup.py +++ b/setup.py @@ -24,10 +24,10 @@ install_requires = [ "lxml>=2.0", ] tests_require = [ - "nose-selecttests", + "pytest", + "pytest-cov", "coverage", "pylint", - "nose", "pep8", ]