Move to pytest since nose is unmaintained.

This commit is contained in:
Jannis Leidel 2017-10-18 09:35:19 +02:00
parent c4349f5c64
commit 45aad4bdbc
No known key found for this signature in database
GPG Key ID: C795956FB489DCA9
6 changed files with 14 additions and 5 deletions

View File

@ -1,5 +1,9 @@
[run]
branch = True
source = redash
[report]
omit =
*/settings.py
*/python?.?/*
*/site-packages/nose/*
show_missing = True

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
.idea
*.pyc
.coverage
coverage.xml
client/dist
.DS_Store
celerybeat-schedule*

View File

@ -4,7 +4,7 @@ FULL_VERSION=$(VERSION)+b$(CIRCLE_BUILD_NUM)
BASE_VERSION=$(shell python ./manage.py version | cut -d + -f 1)
# VERSION gets evaluated every time it's referenced, therefore we need to use VERSION here instead of FULL_VERSION.
FILENAME=$(CIRCLE_ARTIFACTS)/$(NAME).$(VERSION).tar.gz
TEST_ARGS?=--with-coverage --cover-package=redash tests/
TEST_ARGS?=tests/
deps:
if [ -d "./client/app" ]; then npm install; fi
@ -18,4 +18,4 @@ upload:
python bin/release_manager.py $(CIRCLE_SHA1) $(BASE_VERSION) $(FILENAME)
test:
nosetests $(TEST_ARGS)
pytest $(TEST_ARGS)

View File

@ -15,7 +15,7 @@ dependencies:
- node_modules/
test:
override:
- nosetests --with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/junit.xml --with-coverage --cover-package=redash tests/
- pytest --junitxml=$CIRCLE_TEST_REPORTS/junit.xml tests/
deployment:
github_and_docker:
branch: master

3
pytest.ini Normal file
View File

@ -0,0 +1,3 @@
[pytest]
addopts = --cov-report xml --cov-report=term-missing --cov=redash --cov-config .coveragerc
norecursedirs = *.egg .eggs dist build docs .tox

View File

@ -1,4 +1,5 @@
nose==1.3.7
pytest==3.2.3
pytest-cov==2.5.1
coverage==4.0.3
mock==2.0.0