From a87c803cf980272314fb4877047af6006f039bf7 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 9 Dec 2019 22:34:21 -0800 Subject: [PATCH] python3Packages.docker: fix darwin tests --- .../python-modules/docker/default.nix | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/docker/default.nix b/pkgs/development/python-modules/docker/default.nix index 2e0dd468325..3d4a73bc969 100644 --- a/pkgs/development/python-modules/docker/default.nix +++ b/pkgs/development/python-modules/docker/default.nix @@ -1,8 +1,9 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy27 +{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27 , backports_ssl_match_hostname , mock , paramiko , pytest +, pytestCheckHook , requests , six , websocket_client @@ -17,25 +18,25 @@ buildPythonPackage rec { sha256 = "1hdgics03fz2fbhalzys7a7kjj54jnl5a37h6lzdgym41gkwa1kf"; }; + nativeBuildInputs = [ + pytestCheckHook + ] ++ lib.optional isPy27 mock; + propagatedBuildInputs = [ paramiko requests six websocket_client - ] ++ stdenv.lib.optional isPy27 backports_ssl_match_hostname; + ] ++ lib.optional isPy27 backports_ssl_match_hostname; - checkInputs = [ - mock - pytest - ]; - - # Other tests touch network + pytestFlagsArray = [ "tests/unit" ]; # Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket - checkPhase = '' - ${pytest}/bin/pytest tests/unit/ ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=tests/unit/api_test.py::TCPSocketStreamTest"} - ''; + disabledTests = lib.optionals stdenv.isDarwin [ "stream_response" "socket_file" ]; - meta = with stdenv.lib; { + # skip setuptoolsCheckPhase + doCheck = false; + + meta = with lib; { description = "An API client for docker written in Python"; homepage = "https://github.com/docker/docker-py"; license = licenses.asl20;