Skip to content

Commit d4d0480

Browse files
authored
Add tox for easy testing of many Python versions (#523)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent f12452c commit d4d0480

File tree

2 files changed

+47
-14
lines changed

2 files changed

+47
-14
lines changed

pyproject.toml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
[build-system]
2-
requires = ["flit_core >=2,<4"]
32
build-backend = "flit_core.buildapi"
3+
requires = [
4+
"flit_core<4,>=2",
5+
]
46

5-
[tool.flit.metadata]
6-
module = "blurb"
7-
author = "Larry Hastings"
8-
author-email = "[email protected]"
9-
maintainer = "Python Core Developers"
10-
maintainer-email = "[email protected]"
11-
home-page = "https://github.com/python/core-workflow/tree/main/blurb"
7+
[project]
8+
name = "blurb"
9+
description = "Command-line tool to manage CPython Misc/NEWS.d entries."
10+
readme = "README.rst"
11+
maintainers = [{name = "Python Core Developers", email="[email protected]"}]
12+
authors = [{ name="Larry Hastings", email="[email protected]"}]
1213
requires-python = ">=3.8"
13-
description-file = "README.rst"
1414
classifiers = [
15-
"Intended Audience :: Developers",
16-
"License :: OSI Approved :: BSD License",
17-
"Programming Language :: Python :: 3 :: Only"
15+
"Intended Audience :: Developers",
16+
"License :: OSI Approved :: BSD License",
17+
"Programming Language :: Python :: 3 :: Only",
1818
]
19-
20-
[tool.flit.scripts]
19+
dynamic = [
20+
"version",
21+
]
22+
[project.optional-dependencies]
23+
tests = [
24+
"pyfakefs",
25+
"pytest",
26+
"pytest-cov",
27+
]
28+
[project.urls]
29+
Changelog = "https://github.com/python/core-workflow/tree/main/blurb#changelog"
30+
Homepage = "https://github.com/python/core-workflow/tree/main/blurb"
31+
Source = "https://github.com/python/core-workflow/tree/main/blurb"
32+
[project.scripts]
2133
blurb = "blurb:main"

tox.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[tox]
2+
requires =
3+
tox>=4.2
4+
env_list =
5+
py{313, 312, 311, 310, 39, 38}
6+
7+
[testenv]
8+
extras =
9+
tests
10+
pass_env =
11+
FORCE_COLOR
12+
commands =
13+
{envpython} -I -m pytest \
14+
--cov blurb \
15+
--cov tests \
16+
--cov-report html \
17+
--cov-report term \
18+
--cov-report xml \
19+
{posargs}
20+
blurb test
21+
blurb help

0 commit comments

Comments
 (0)