python3Packages.docker: fix darwin tests

This commit is contained in:
Jonathan Ringer
2019-12-10 13:16:51 -08:00
committed by Jon
parent 2e44944de5
commit a87c803cf9
@@ -1,8 +1,9 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy27 { lib, stdenv, buildPythonPackage, fetchPypi, isPy27
, backports_ssl_match_hostname , backports_ssl_match_hostname
, mock , mock
, paramiko , paramiko
, pytest , pytest
, pytestCheckHook
, requests , requests
, six , six
, websocket_client , websocket_client
@@ -17,25 +18,25 @@ buildPythonPackage rec {
sha256 = "1hdgics03fz2fbhalzys7a7kjj54jnl5a37h6lzdgym41gkwa1kf"; sha256 = "1hdgics03fz2fbhalzys7a7kjj54jnl5a37h6lzdgym41gkwa1kf";
}; };
nativeBuildInputs = [
pytestCheckHook
] ++ lib.optional isPy27 mock;
propagatedBuildInputs = [ propagatedBuildInputs = [
paramiko paramiko
requests requests
six six
websocket_client websocket_client
] ++ stdenv.lib.optional isPy27 backports_ssl_match_hostname; ] ++ lib.optional isPy27 backports_ssl_match_hostname;
checkInputs = [ pytestFlagsArray = [ "tests/unit" ];
mock
pytest
];
# Other tests touch network
# Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket # Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
checkPhase = '' disabledTests = lib.optionals stdenv.isDarwin [ "stream_response" "socket_file" ];
${pytest}/bin/pytest tests/unit/ ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=tests/unit/api_test.py::TCPSocketStreamTest"}
'';
meta = with stdenv.lib; { # skip setuptoolsCheckPhase
doCheck = false;
meta = with lib; {
description = "An API client for docker written in Python"; description = "An API client for docker written in Python";
homepage = "https://github.com/docker/docker-py"; homepage = "https://github.com/docker/docker-py";
license = licenses.asl20; license = licenses.asl20;