Skip to content

Commit

Permalink
Improve testing speed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
liZe committed May 17, 2022
1 parent bf6041b commit e6021da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Donation = 'https://opencollective.com/courtbouillon'

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

[project.scripts]
weasyprint = 'weasyprint.__main__:main'
Expand All @@ -61,7 +61,7 @@ weasyprint = 'weasyprint.__main__:main'
exclude = ['.*', 'tests/results']

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

[tool.coverage.run]
branch = true
Expand Down

0 comments on commit e6021da

Please sign in to comment.