python3Packages.docker: fix darwin tests
This commit is contained in:
parent
2e44944de5
commit
a87c803cf9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user