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