python3Packages.sqlalchemy: parallelize tests with xdist

Cuts down the test phase from 11 to 4 minutes on my remote builder.
This commit is contained in:
Martin Weinelt 2021-02-02 15:41:16 +01:00 committed by Frederik Rietdijk
parent 7369d9eef7
commit 6904fe3b15

View file

@ -2,6 +2,7 @@
, mock
, pysqlite
, pytestCheckHook
, pytest_xdist
}:
buildPythonPackage rec {
@ -15,9 +16,12 @@ buildPythonPackage rec {
checkInputs = [
pytestCheckHook
pytest_xdist
mock
] ++ lib.optional (!isPy3k) pysqlite;
pytestFlagsArray = [ "-n auto" ];
postInstall = ''
sed -e 's:--max-worker-restart=5::g' -i setup.cfg
'';