nixpkgs/pkgs/development/python-modules/vcrpy/default.nix
2020-08-16 19:31:19 +02:00

49 lines
874 B
Nix

{ buildPythonPackage
, lib
, six
, fetchPypi
, pyyaml
, mock
, contextlib2
, wrapt
, pytest
, pytest-httpbin
, yarl
, pythonOlder
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "vcrpy";
version = "4.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "4138e79eb35981ad391406cbb7227bce7eba8bad788dcf1a89c2e4a8b740debe";
};
checkInputs = [
pytest
pytest-httpbin
];
propagatedBuildInputs = [
pyyaml
wrapt
six
]
++ lib.optionals (pythonOlder "3.3") [ contextlib2 mock ]
++ lib.optionals (pythonAtLeast "3.4") [ yarl ];
checkPhase = ''
py.test --ignore=tests/integration -k "not TestVCRConnection"
'';
meta = with lib; {
description = "Automatically mock your HTTP interactions to simplify and speed up testing";
homepage = "https://github.com/kevin1024/vcrpy";
license = licenses.mit;
};
}