From 65b89aa38e0eb83cdf83b71a98dca25a3c8c16b0 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Wed, 23 Mar 2016 14:15:21 +0100 Subject: [PATCH] Test suite updates --- .coverage.rc => .coveragerc | 0 .travis.yml | 31 +++++++++++-------------------- requirements.txt | 8 ++++---- runtests.py | 13 +++++++++++++ runtests.sh | 3 --- setup.py | 4 ++-- tox.ini | 23 ++++++++--------------- 7 files changed, 38 insertions(+), 44 deletions(-) rename .coverage.rc => .coveragerc (100%) mode change 100644 => 100755 runtests.py delete mode 100644 runtests.sh diff --git a/.coverage.rc b/.coveragerc similarity index 100% rename from .coverage.rc rename to .coveragerc diff --git a/.travis.yml b/.travis.yml index 1d148da..8e71bf5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,22 @@ -sudo: false - language: python python: - 2.7 - - 3.4 + - 3.5 env: - - DJANGO=1.4.21 - - DJANGO=1.7.9 - - DJANGO=1.8.3 + - DJANGO=1.8.* + - DJANGO=1.9.* -matrix: - exclude: - - python: 3.4 - env: DJANGO=1.4.21 - - python: 3.4 - env: DJANGO=1.7.9 - -branches: - only: - - master - - develop +before_install: + - pip install codecov install: - - "pip install Django==$DJANGO" - - "pip install -e ." + - pip install django==$DJANGO + - pip install -e . script: - python runtests.py + - coverage run runtests.py + +after_success: + - codecov diff --git a/requirements.txt b/requirements.txt index f2e70bf..20b6c20 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,10 +5,10 @@ # ----------------------------------------------------------------------------- # Project dependencies -django==1.8.3 -django-mptt==0.7.4 -pygments==2.0.1 -requests==2.5.1 +django==1.9.* +django-mptt +pygments +requests # Testing coverage diff --git a/runtests.py b/runtests.py old mode 100644 new mode 100755 index 06c67ce..770f4e4 --- a/runtests.py +++ b/runtests.py @@ -16,6 +16,19 @@ SETTINGS = { # 'PASSWORD': '', # } }, + 'TEMPLATES': [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + ], + }, + }, + ], 'INSTALLED_APPS': [ 'django.contrib.sessions', 'django.contrib.staticfiles', diff --git a/runtests.sh b/runtests.sh deleted file mode 100644 index c0cd54b..0000000 --- a/runtests.sh +++ /dev/null @@ -1,3 +0,0 @@ -coverage run --rcfile=./.coverage.rc runtests.py && \ -coverage html --rcfile=./.coverage.rc - diff --git a/setup.py b/setup.py index ae3eb0a..e152e65 100644 --- a/setup.py +++ b/setup.py @@ -49,8 +49,8 @@ setup( }, include_package_data=True, install_requires=[ - 'django>=1.4', - 'django-mptt>=0.7.4', + 'django>=1.8', + 'django-mptt>=0.8.3', 'pygments>=1.6', 'requests>=2.0.0', ], diff --git a/tox.ini b/tox.ini index 0ea4bdd..155def6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,23 +1,16 @@ [tox] toxworkdir=/tmp/tox/dpaste envlist= - py27-django-1.4, - py27-django-1.7, - py27-django-1.8, - py34-django-1.8 + py{27,35}-django-{18,19} [testenv] +install_command = + pip install {opts} {packages} + commands= python runtests.py -[testenv:py27-django-1.4] -deps=django==1.4.21 - -[testenv:py27-django-1.7] -deps=django==1.7.9 - -[testenv:py27-django-1.8] -deps=django==1.8.3 - -[testenv:py34-django-1.8] -deps=django==1.8.3 +deps= + # Django versions + django-18: django==1.8.* + django-19: django==1.9.*