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-20 10:29:43 +01:00
committed by Frederik Rietdijk
parent 7369d9eef7
commit 6904fe3b15
@@ -2,6 +2,7 @@
, mock , mock
, pysqlite , pysqlite
, pytestCheckHook , pytestCheckHook
, pytest_xdist
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@@ -15,9 +16,12 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
pytest_xdist
mock mock
] ++ lib.optional (!isPy3k) pysqlite; ] ++ lib.optional (!isPy3k) pysqlite;
pytestFlagsArray = [ "-n auto" ];
postInstall = '' postInstall = ''
sed -e 's:--max-worker-restart=5::g' -i setup.cfg sed -e 's:--max-worker-restart=5::g' -i setup.cfg
''; '';