From 4ad097b4fa6f9bd2036679cb35fe2df409e1331d Mon Sep 17 00:00:00 2001 From: Paul J Stevens Date: Sat, 26 May 2018 14:57:03 +0200 Subject: [PATCH] include wagtail-2.1 in test matrix --- .travis.yml | 3 ++- setup.cfg | 6 +++--- tests/unit/test_models.py | 4 ++-- tox.ini | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index c68b443..81b71bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,10 @@ matrix: include: - python: 3.6 env: lint - - python: 3.6 env: TOXENV=py36-django20-wagtail20 + - python: 3.6 + env: TOXENV=py36-django20-wagtail21 install: - pip install tox codecov diff --git a/setup.cfg b/setup.cfg index 5faf6ce..5dc536e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,9 +21,9 @@ exclude = [wheel] universal = 1 -[coverage:run] -omit = - src/**/migrations/*.py +[coverage] +include = src/**/ +omit = src/**/migrations/*.py [bumpversion:file:setup.py] diff --git a/tests/unit/test_models.py b/tests/unit/test_models.py index 3f1e886..085da2f 100644 --- a/tests/unit/test_models.py +++ b/tests/unit/test_models.py @@ -4,10 +4,10 @@ import datetime import pytest -from tests.factories.segment import SegmentFactory from tests.factories.page import ContentPageFactory -from wagtail_personalisation.rules import TimeRule +from tests.factories.segment import SegmentFactory from tests.site.pages import models +from wagtail_personalisation.rules import TimeRule @pytest.mark.django_db diff --git a/tox.ini b/tox.ini index 16eb736..0993375 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{36}-django{20}-wagtail{20},lint +envlist = py{36}-django{20}-wagtail{20,21},lint [testenv] basepython = python3.6 @@ -7,7 +7,8 @@ commands = coverage run --parallel -m pytest {posargs} extras = test deps = django20: django>=2.0,<2.2 - wagtail20: wagtail>=2.0,<2.2 + wagtail20: wagtail>=2.0,<2.1 + wagtail21: wagtail>=2.1,<2.2 [testenv:coverage-report] basepython = python3.6 @@ -15,8 +16,7 @@ deps = coverage pip_pre = true skip_install = true commands = - coverage combine - coverage report + coverage report --include="src/**/" --omit="src/**/migrations/*.py" [testenv:lint] basepython = python3.6