From 47a3a1127ffee9bc8c127301390ff95857492b88 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Fri, 13 Sep 2019 13:03:18 -0700 Subject: [PATCH] pythonPackage.celery: fix tests --- .../python-modules/celery/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/celery/default.nix b/pkgs/development/python-modules/celery/default.nix index d499a937f501..19eaeaf8d827 100644 --- a/pkgs/development/python-modules/celery/default.nix +++ b/pkgs/development/python-modules/celery/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, iana-etc, libredirect +{ lib, buildPythonPackage, fetchPypi, libredirect , case, pytest, boto3, moto, kombu, billiard, pytz, anyjson, amqp, eventlet }: @@ -17,19 +17,17 @@ buildPythonPackage rec { --replace "pytest>=4.3.1,<4.4.0" pytest ''; - # make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox - preCheck = stdenv.lib.optionalString stdenv.isLinux '' - export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \ - LD_PRELOAD=${libredirect}/lib/libredirect.so - ''; - postCheck = stdenv.lib.optionalString stdenv.isLinux '' - unset NIX_REDIRECTS LD_PRELOAD + # ignore test that's incompatible with pytest5 + # test_eventlet touches network + checkPhase = '' + pytest -k 'not restore_current_app_fallback' \ + --ignore=t/unit/concurrency/test_eventlet.py ''; checkInputs = [ case pytest boto3 moto ]; propagatedBuildInputs = [ kombu billiard pytz anyjson amqp eventlet ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/celery/celery/; description = "Distributed task queue"; license = licenses.bsd3;