From 646a4e0b8b918993e4ca8f8eeeb3f63b2bded3ee Mon Sep 17 00:00:00 2001 From: NyanKiyoshi Date: Sun, 16 Sep 2018 16:27:18 +0200 Subject: [PATCH] Add python 2.7, 3.3, 3.4 to the test matrix --- .travis.yml | 21 +++++++-------------- requirements-dev.txt | 17 +++++++++++++++++ requirements.txt | 17 +++++++++++++++++ setup.py | 7 ++++++- tests/test_sendkeys.py | 3 ++- texrrow/application.py | 1 - texrrow/core/views.py | 1 + texrrow/sendkeys/views.py | 3 ++- texrrow/settings.py | 1 + 9 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 requirements-dev.txt create mode 100644 requirements.txt diff --git a/.travis.yml b/.travis.yml index 099515e..f7887dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,16 +5,15 @@ cache: - node_modules sudo: false python: + - "2.6" + - "2.7" + - "3.3" + - "3.4" - "3.5" - "3.6" - "pypy3" -services: - - postgresql -env: - global: - - DATABASE_URL=postgres://postgres@localhost:5432/showcased install: - - pip install codecov pytest-cov pipenv + - pip install codecov pytest-cov - nvm install 8 - npm i - npm run build-assets --production @@ -27,17 +26,11 @@ matrix: sudo: required dist: xenial allow_failures: - - python: "pypy3" - python: "nightly" fast_finish: true -before_script: # code coverage tool - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build script: - - pipenv install + - pip install -r requirements.txt + - pip install -r requirements-dev.txt - pytest --cov --cov-report= -after_script: - - if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi after_success: - codecov diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..458ef59 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,17 @@ +################################################################################ +# This requirements file has been automatically generated from `Pipfile` with +# `pipenv-to-requirements` +# +# +# This has been done to maintain backward compatibility with tools and services +# that do not support `Pipfile` yet. +# +# Do NOT edit it directly, use `pipenv install [-d]` to modify `Pipfile` and +# `Pipfile.lock` and then regenerate `requirements*.txt`. +################################################################################ + +blinker +coverage +flask-debugtoolbar +pipenv-to-requirements +pytest diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..da290ce --- /dev/null +++ b/requirements.txt @@ -0,0 +1,17 @@ +################################################################################ +# This requirements file has been automatically generated from `Pipfile` with +# `pipenv-to-requirements` +# +# +# This has been done to maintain backward compatibility with tools and services +# that do not support `Pipfile` yet. +# +# Do NOT edit it directly, use `pipenv install [-d]` to modify `Pipfile` and +# `Pipfile.lock` and then regenerate `requirements*.txt`. +################################################################################ + +flask +flask-babel +flask-bootstrap-4-alpha +flask-wtf +keyboard diff --git a/setup.py b/setup.py index 8760d2a..22922a7 100755 --- a/setup.py +++ b/setup.py @@ -40,10 +40,15 @@ 'Operating System :: POSIX :: BSD :: NetBSD', 'Operating System :: POSIX :: BSD :: OpenBSD', 'Operating System :: POSIX :: Other', - 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.3', 'Framework :: Flask', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', diff --git a/tests/test_sendkeys.py b/tests/test_sendkeys.py index ac37462..9440064 100644 --- a/tests/test_sendkeys.py +++ b/tests/test_sendkeys.py @@ -1,5 +1,6 @@ -import pytest from unittest import mock + +import pytest from flask import url_for from .settings import NEXT_SLIDE_KEY, PREV_SLIDE_KEY diff --git a/texrrow/application.py b/texrrow/application.py index 14ae44e..55d5504 100644 --- a/texrrow/application.py +++ b/texrrow/application.py @@ -1,7 +1,6 @@ import os.path import jinja2 - from flask_babel import pgettext from flask_wtf.csrf import generate_csrf diff --git a/texrrow/core/views.py b/texrrow/core/views.py index 06c95dc..9f8d170 100644 --- a/texrrow/core/views.py +++ b/texrrow/core/views.py @@ -1,4 +1,5 @@ from flask import render_template + from .extensions import app diff --git a/texrrow/sendkeys/views.py b/texrrow/sendkeys/views.py index 5cd0746..c84890c 100644 --- a/texrrow/sendkeys/views.py +++ b/texrrow/sendkeys/views.py @@ -1,5 +1,6 @@ +from flask import Blueprint, Response, current_app + import keyboard -from flask import Blueprint, current_app, Response sendkeys_bp = Blueprint( url_prefix='/sendkeys', name='sendkeys', import_name=__name__) diff --git a/texrrow/settings.py b/texrrow/settings.py index 1a5e613..f6aa07d 100644 --- a/texrrow/settings.py +++ b/texrrow/settings.py @@ -1,4 +1,5 @@ import os.path + from texrrow.core.utils.environ import getenv, getenv_bool APP_DIR = os.path.abspath(os.path.dirname(__file__))