6b999f3c42
Did not test all packages. Likely we'll have some breakage.
51 lines
915 B
Nix
51 lines
915 B
Nix
{ buildPythonPackage
|
|
, lib
|
|
, six
|
|
, fetchPypi
|
|
, pyyaml
|
|
, mock
|
|
, contextlib2
|
|
, wrapt
|
|
, pytest
|
|
, httpbin
|
|
, pytest-httpbin
|
|
, yarl
|
|
, pythonOlder
|
|
, pythonAtLeast
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "vcrpy";
|
|
version = "1.11.0";
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "beb30de89c3618482ea76662b4135d48fef7417589df49c303b2e85db40c9705";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|
|
|