1{ buildPythonPackage 2, lib 3, six 4, fetchPypi 5, pyyaml 6, mock 7, contextlib2 8, wrapt 9, pytest 10, httpbin 11, pytest-httpbin 12, yarl 13, pythonOlder 14, pythonAtLeast 15}: 16 17buildPythonPackage rec { 18 pname = "vcrpy"; 19 version = "1.11.1"; 20 name = "${pname}-${version}"; 21 22 src = fetchPypi { 23 inherit pname version; 24 sha256 = "f434fe7e05d940d576ac850709ae57a738ba40e7f317076ea8d359ced5b32320"; 25 }; 26 27 checkInputs = [ 28 pytest 29 pytest-httpbin 30 ]; 31 32 propagatedBuildInputs = [ 33 pyyaml 34 wrapt 35 six 36 ] 37 ++ lib.optionals (pythonOlder "3.3") [ contextlib2 mock ] 38 ++ lib.optionals (pythonAtLeast "3.4") [ yarl ]; 39 40 checkPhase = '' 41 py.test --ignore=tests/integration -k "not TestVCRConnection" 42 ''; 43 44 meta = with lib; { 45 description = "Automatically mock your HTTP interactions to simplify and speed up testing"; 46 homepage = https://github.com/kevin1024/vcrpy; 47 license = licenses.mit; 48 }; 49} 50