From 9b1dd33f0654e9c61e0cf5acae75a63c410bb108 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 2 Feb 2021 15:41:16 +0100 Subject: [PATCH] python3Packages.sqlalchemy: parallelize tests with xdist Cuts down the test phase from 11 to 4 minutes on my remote builder. --- pkgs/development/python-modules/sqlalchemy/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix index 52c5e27fd58..6f5fb557866 100644 --- a/pkgs/development/python-modules/sqlalchemy/default.nix +++ b/pkgs/development/python-modules/sqlalchemy/default.nix @@ -2,6 +2,7 @@ , mock , pysqlite , pytestCheckHook +, pytest_xdist }: buildPythonPackage rec { @@ -23,9 +24,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 '';