diff --git a/.travis.yml b/.travis.yml index e27ffd5..c1ec038 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,16 @@ language: python -env: -- TOXENV=py27 -- TOXENV=py33 +matrix: + include: + - python: 3.8 + env: TOXENV=py38 + - python: 3.7 + env: TOXENV=py37 + - python: 3.6 + env: TOXENV=py36 + - python: 3.5 + env: TOXENV=py35 + - python: 2.7 + env: TOXENV=py27 install: pip install tox script: tox services: diff --git a/tests/conftest.py b/tests/conftest.py index efecd1d..23ce0f8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -36,13 +36,12 @@ def store(request): if request.param == 'dict': return DictStore() elif request.param == 'redis': - return request.getfuncargvalue('redis_store') + return request.getfixturevalue('redis_store') assert False -@pytest.fixture -def client(app): +def _client(app): client = app.test_client() def get_session_cookie(self, path='/'): @@ -56,7 +55,11 @@ def get_session_cookie(self, path='/'): @pytest.fixture -def app(store): +def client(app): + return _client(app) + + +def _app(store): app = Flask(__name__) app.kvsession = KVSessionExtension(store, app) @@ -133,3 +136,8 @@ def destroy_immediately(): return 'PROFIT' return app + + +@pytest.fixture +def app(store): + return _app(store) diff --git a/tests/test_expiration.py b/tests/test_expiration.py index aef313e..ba3cbfe 100644 --- a/tests/test_expiration.py +++ b/tests/test_expiration.py @@ -1,6 +1,6 @@ from datetime import timedelta -from conftest import app as app_, client as client_ +from conftest import _app, _client import pytest @@ -9,12 +9,12 @@ @pytest.fixture def redis_app(redis_store): - return app_(redis_store) + return _app(redis_store) @pytest.fixture def redis_client(redis_app): - return client_(redis_app) + return _client(redis_app) def test_redis_expiration_permanent_session( diff --git a/tox.ini b/tox.ini index a2fd8d0..d7dd3ae 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py33 +envlist = py27,py35,py36,py37,py38 [testenv] deps=