Skip to content

Commit

Permalink
pytest migration + enable Python 3.10 (#464)
Browse files Browse the repository at this point in the history
Co-authored-by: pgajdos <[email protected]>
Co-authored-by: epenet <[email protected]>
  • Loading branch information
3 people authored Apr 3, 2022
1 parent 402da7c commit 6003cb3
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 227 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
fail-fast: false
matrix:
include:
- { python-version: "3.9", session: "flake8" }
- { python-version: "3.9", session: "py39" }
- { python-version: "3.8", session: "py38" }
- { python-version: "3.7", session: "py37" }
- { python-version: "3.6", session: "py36" }
- { python-version: "2.7", session: "py27" }
- { python-version: "3.10", session: "flake8" }
- { python-version: "3.10", session: "py310" }
- { python-version: "3.9", session: "py39" }
- { python-version: "3.8", session: "py38" }
- { python-version: "3.7", session: "py37" }
- { python-version: "3.6", session: "py36" }
- { python-version: "2.7", session: "py27" }

steps:
- name: Check out the repository
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,9 +715,9 @@ s({'password':'123', 'password_again': 1337})

## Running tests

Voluptuous is using nosetests:
Voluptuous is using pytest:

$ nosetests
$ pytest


## Other libraries and inspirations
Expand Down
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
python_files = tests.py
testpaths = voluptuous/tests
addopts = --doctest-glob=*.md -v
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

14 changes: 6 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = flake8,py27,py36,py37,py38,py39
envlist = flake8,py27,py36,py37,py38,py39,py310

[flake8]
; E501: line too long (X > 79 characters)
Expand All @@ -12,15 +12,13 @@ distribute = True
sitepackages = False
setuptools_version = setuptools<58.0
deps =
nose
nose-cover3
pytest
pytest-cov
coverage>=3.0
commands =
nosetests \
--with-coverage3 \
--cover3-package=voluptuous \
--cover3-branch \
--verbose {posargs}
pytest \
--cov=voluptuous \
voluptuous/tests/

[testenv:flake8]
deps = flake8
Expand Down
Loading

0 comments on commit 6003cb3

Please sign in to comment.