Skip to content

Commit

Permalink
Python 2.7 and 3.5 support was already dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 20, 2021
1 parent db5d7c9 commit 3490ccb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 41 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/test.yml
Expand Up @@ -13,9 +13,10 @@ jobs:
matrix:
python-version: ["pypy3", "3.6", "3.7", "3.8", "3.9"]
tox-extra-versions: [
"pytest46-xdist133-coverage55",
"pytest54-xdist133-coverage55",
"pytest62-xdist202-coverage55",
"pytest46-xdist127",
"pytest46-xdist133",
"pytest54-xdist133",
"pytest62-xdist202",
]
include:
# Add new helper variables to existing jobs
Expand All @@ -24,13 +25,6 @@ jobs:
- {python-version: "3.7", tox-python-version: "py37"}
- {python-version: "3.8", tox-python-version: "py38"}
- {python-version: "3.9", tox-python-version: "py39"}
# Add extra jobs to the matrix
- {tox-extra-versions: "pytest46-xdist127", python-version: "pypy-2.7", tox-python-version: "pypy"}
- {tox-extra-versions: "pytest46-xdist127", python-version: "pypy3", tox-python-version: "pypy3"}
- {tox-extra-versions: "pytest46-xdist127", python-version: "2.7", tox-python-version: "py27"}
- {tox-extra-versions: "pytest46-xdist127", python-version: "3.5", tox-python-version: "py35"}
- {tox-extra-versions: "pytest46-xdist127", python-version: "3.6", tox-python-version: "py36"}
- {tox-extra-versions: "pytest46-xdist127", python-version: "3.7", tox-python-version: "py37"}

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -65,4 +59,4 @@ jobs:
- name: Tox tests
run: |
tox -v -e ${{ matrix.tox-python-version }}-${{ matrix.tox-extra-versions }}
tox -v -e ${{ matrix.tox-python-version }}-${{ matrix.tox-extra-versions }}-coverage55
14 changes: 2 additions & 12 deletions examples/adhoc-layout/example/__init__.py
@@ -1,12 +1,2 @@
import sys

PY2 = sys.version_info[0] == 2


if PY2:
def add(a, b):
return b + a

else:
def add(a, b):
return a + b
def add(a, b):
return a + b
6 changes: 3 additions & 3 deletions examples/adhoc-layout/tox.ini
@@ -1,13 +1,13 @@
[tox]
envlist = py27,py38,report
envlist = py38,report

[tool:pytest]
addopts =
--cov-report=term-missing

[testenv]
setenv =
py{27,38}: COVERAGE_FILE = .coverage.{envname}
py38: COVERAGE_FILE = .coverage.{envname}
commands = pytest --cov --cov-config={toxinidir}/.coveragerc {posargs:-vv}
deps =
pytest
Expand All @@ -19,7 +19,7 @@ deps =
../..

depends =
report: py27,py38
report: py38

# note that this is necessary to prevent the tests importing the code from your badly laid project
changedir = tests
Expand Down
14 changes: 2 additions & 12 deletions examples/src-layout/src/example/__init__.py
@@ -1,12 +1,2 @@
import sys

PY2 = sys.version_info[0] == 2


if PY2:
def add(a, b):
return b + a

else:
def add(a, b):
return a + b
def add(a, b):
return a + b
6 changes: 3 additions & 3 deletions examples/src-layout/tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = py27,py38,report
envlist = py38,report

[tool:pytest]
testpaths = tests
Expand All @@ -8,7 +8,7 @@ addopts =

[testenv]
setenv =
py{27,38}: COVERAGE_FILE = .coverage.{envname}
py38: COVERAGE_FILE = .coverage.{envname}
commands = pytest --cov {posargs:-vv}
deps =
pytest
Expand All @@ -20,7 +20,7 @@ deps =
../..

depends =
report: py27,py38
report: py38

[testenv:report]
skip_install = true
Expand Down

0 comments on commit 3490ccb

Please sign in to comment.