Skip to content

Commit e6021da

Browse files
committedMay 17, 2022
Improve testing speed
We don’t require coverage each time we launch tests. We keep it in the list of dependencies (as it’s always useful to get coverage when needed), but we don’t use the option by default. It doesn’t change the hard requirements for having passing tests, because coverage wasn’t automatically checked. We also use xdist to launch parallel tests on multicore CPUs. Let’s save some time and some energy (the world is burning 🔥) for our CI.
1 parent bf6041b commit e6021da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Donation = 'https://opencollective.com/courtbouillon'
5252

5353
[project.optional-dependencies]
5454
doc = ['sphinx', 'sphinx_rtd_theme']
55-
test = ['pytest', 'pytest-cov', 'pytest-flake8', 'pytest-isort', 'coverage[toml]']
55+
test = ['pytest', 'pytest-xdist', 'pytest-flake8', 'pytest-isort', 'pytest-cov', 'coverage[toml]']
5656

5757
[project.scripts]
5858
weasyprint = 'weasyprint.__main__:main'
@@ -61,7 +61,7 @@ weasyprint = 'weasyprint.__main__:main'
6161
exclude = ['.*', 'tests/results']
6262

6363
[tool.pytest.ini_options]
64-
addopts = '--isort --flake8 --cov --no-cov-on-fail'
64+
addopts = '--isort --flake8 --numprocesses=auto'
6565

6666
[tool.coverage.run]
6767
branch = true

0 commit comments

Comments
 (0)
Please sign in to comment.