Skip to content

Commit a41f5d2

Browse files
committed
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 291c142 commit a41f5d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ Donation = 'https://opencollective.com/courtbouillon'
4141

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

4646
[tool.flit.sdist]
4747
exclude = ['.*']
4848

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

5353
[tool.coverage.run]

0 commit comments

Comments
 (0)