Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 22 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,33 @@
name: build

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
tox_env: [
"py35",
"py36",
"py37",
"py38",
"pre",
"linting",
]

python: ["3.5", "3.6", "3.7", "3.8", "3.9"]
os: [ubuntu-latest, macos-latest]
include:
- tox_env: "py35"
python: "3.5"
- tox_env: "py36"
python: "3.6"
- tox_env: "py37"
python: "3.7"
- tox_env: "py38"
python: "3.8"
- tox_env: "pre"
python: "3.7"
- tox_env: "linting"
python: "3.7"

- python: "3.5"
tox_env: "py35"
- python: "3.6"
tox_env: "py36"
- python: "3.7"
tox_env: "py37"
- python: "3.8"
tox_env: "py38"
- python: "3.9"
tox_env: "py39"
- python: "3.8"
tox_env: "pre"
- python: "3.8"
tox_env: "linting"
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install tox
Expand All @@ -46,21 +37,16 @@ jobs:
- name: Test
run: |
tox -e ${{ matrix.tox_env }}

deploy:

if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

runs-on: ubuntu-latest

needs: build

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: "3.7"
python-version: "3.8"
- name: Install wheel
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 0 additions & 1 deletion pytest_flask/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from ._internal import _determine_scope
from ._internal import _make_accept_header
from ._internal import _rewrite_server_name
from ._internal import deprecated
from .live_server import LiveServer


Expand Down
6 changes: 5 additions & 1 deletion pytest_flask/live_server.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import logging
import multiprocessing
import os
import platform
import signal
import socket
import time

import pytest

from ._internal import deprecated

# force 'fork' on macOS
if platform.system() == "Darwin":
multiprocessing.set_start_method("fork")


class LiveServer:
Expand Down
4 changes: 0 additions & 4 deletions pytest_flask/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
:copyright: (c) by Vital Kudzelka
:license: MIT
"""
import sys

import pytest
from flask import json
from werkzeug.utils import cached_property

from .fixtures import accept_any
from .fixtures import accept_json
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
import os

from setuptools import find_packages
from setuptools import setup


Expand Down
1 change: 0 additions & 1 deletion tests/test_json_response.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from flask import Flask
from flask import url_for


Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tox]
envlist =
py{35,36,37,38,linting}
py{35,36,37,38,39,linting}

[pytest]
norecursedirs = .git .tox env coverage docs
pep8ignore =
docs/conf.py ALL
pep8maxlinelength = 119
pep8maxlinelength = 79

[testenv:dev]
commands =
Expand All @@ -17,7 +17,7 @@ deps=
-rrequirements/docs.txt
pre-commit>=1.11.0
tox
basepython = python3.7
basepython = python3.8
usedevelop = True

[testenv]
Expand Down Expand Up @@ -54,7 +54,7 @@ commands = {[testenv]commands}

[testenv:linting]
skip_install = True
basepython = python3.7
basepython = python3.8
deps = pre-commit>=1.11.0
commands = pre-commit run --all-files --show-diff-on-failure {posargs:}

Expand Down