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 27, 2022
1 parent 291c142 commit a41f5d2
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 @@ -41,13 +41,13 @@ 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]']

[tool.flit.sdist]
exclude = ['.*']

[tool.pytest.ini_options]
addopts = '--isort --flake8 --cov --no-cov-on-fail'
addopts = '--isort --flake8 --numprocesses=auto'
norecursedirs = ['tests/css-parsing-tests']

[tool.coverage.run]
Expand Down

0 comments on commit a41f5d2

Please sign in to comment.