Update tests to be py.test

pull/29/head
Richard Harding 10 years ago
parent d7038a0845
commit c1e2e529a9

@ -11,4 +11,4 @@ install:
- python setup.py install - python setup.py install
- pip install -r requirements.txt --use-mirrors - pip install -r requirements.txt --use-mirrors
# command to run tests # command to run tests
script: nosetests tests script: p.test -q --tb native -s tests

@ -3,17 +3,21 @@ WD := $(shell pwd)
PY := bin/python PY := bin/python
PIP := bin/pip PIP := bin/pip
PEP8 := bin/pep8 PEP8 := bin/pep8
NOSE := bin/nosetests PYTEST := bin/py.test
# ########### # ###########
# Tests rule! # Tests rule!
# ########### # ###########
.PHONY: test .PHONY: test
test: venv develop $(NOSE) test: venv develop $(PYTEST)
$(NOSE) -s tests $(PYTEST) -q --tb native -s tests
$(NOSE): .PHONY: test-coverage
$(PIP) install nose nose-selecttests pep8 pylint coverage test-coverage: venv develop $(PYTEST)
$(PYTEST) -q --cov breadability tests
$(PYTEST):
$(PIP) install -r requirements.txt
# ####### # #######
# INSTALL # INSTALL
@ -42,8 +46,8 @@ lib/python*/site-packages/breadability.egg-link:
# ########### # ###########
# Development # Development
# ########### # ###########
.PHONY: clean_all .PHONY: clean-all
clean_all: clean_venv clean-all: clean_venv
if [ -d dist ]; then \ if [ -d dist ]; then \
rm -r dist; \ rm -r dist; \
fi fi

@ -2,8 +2,8 @@ docopt>=0.6.1,<0.7
chardet chardet
lxml lxml
nose-selecttests pytest
pylint pytest-cov
coverage coverage
nose pylint
pep8 pep8

@ -24,10 +24,10 @@ install_requires = [
"lxml>=2.0", "lxml>=2.0",
] ]
tests_require = [ tests_require = [
"nose-selecttests", "pytest",
"pytest-cov",
"coverage", "coverage",
"pylint", "pylint",
"nose",
"pep8", "pep8",
] ]

Loading…
Cancel
Save