Parallelize tests as much as possible, by default

This commit is contained in:
Pradyun Gedam 2019-09-27 23:25:32 +05:30
parent 2f57f91110
commit 51dc60f8a7
No known key found for this signature in database
GPG Key ID: DA17C4B29CB32E4B
1 changed files with 4 additions and 1 deletions

View File

@ -84,8 +84,11 @@ def test(session):
session.run(*protected_pip("install", "."))
session.run(*protected_pip("install", "-r", REQUIREMENTS["tests"]))
# Parallelize tests as much as possible, by default.
arguments = session.posargs or ["-n", "auto"]
# Run the tests
session.run("pytest", *session.posargs, env={"LC_CTYPE": "en_US.UTF-8"})
session.run("pytest", *arguments, env={"LC_CTYPE": "en_US.UTF-8"})
@nox.session