pythonPackages.vcrpy: fix tests
This commit is contained in:
parent
fd1f1aca9e
commit
3f4dea0c89
@ -1,38 +1,44 @@
|
|||||||
{ buildPythonPackage
|
{ buildPythonPackage
|
||||||
, lib
|
, lib
|
||||||
, pkgs
|
, six
|
||||||
|
, fetchPypi
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, mock
|
, mock
|
||||||
, contextlib2
|
, contextlib2
|
||||||
, wrapt
|
, wrapt
|
||||||
, pytest_27
|
, pytest
|
||||||
, httpbin
|
, httpbin
|
||||||
, pytest-httpbin
|
, pytest-httpbin
|
||||||
, yarl
|
, yarl
|
||||||
|
, pythonOlder
|
||||||
|
, pythonAtLeast
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
pname = "vcrpy";
|
||||||
version = "1.10.5";
|
version = "1.10.5";
|
||||||
name = "vcrpy-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = fetchPypi {
|
||||||
url = "mirror://pypi/v/vcrpy/vcrpy-${version}.tar.gz";
|
inherit pname version;
|
||||||
sha256 = "12kncg6jyvj15mi8ca74514f2x1ih753nhyz769nwvh39r468167";
|
sha256 = "12kncg6jyvj15mi8ca74514f2x1ih753nhyz769nwvh39r468167";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
checkInputs = [
|
||||||
pyyaml
|
pytest
|
||||||
mock
|
|
||||||
contextlib2
|
|
||||||
wrapt
|
|
||||||
pytest_27
|
|
||||||
httpbin
|
|
||||||
pytest-httpbin
|
pytest-httpbin
|
||||||
yarl
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
pyyaml
|
||||||
|
wrapt
|
||||||
|
six
|
||||||
|
]
|
||||||
|
++ lib.optionals (pythonOlder "3.3") [ contextlib2 mock ]
|
||||||
|
++ lib.optionals (pythonAtLeast "3.4") [ yarl ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
py.test --ignore=tests/integration -k "TestVCRConnection.testing_connect"
|
py.test --ignore=tests/integration -k "not TestVCRConnection"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user