Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, buildPythonPackage, fetchPypi, fetchpatch 2, mock, pytest, sybil, zope_component }: 3 4buildPythonPackage rec { 5 pname = "testfixtures"; 6 version = "6.3.0"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "1x16xkw483nb1ngv74s7lgaj514pb1ldklal7kb7iwqbxcgnrh2k"; 11 }; 12 13 checkInputs = [ pytest mock sybil zope_component ]; 14 15 patches = [ 16 # Fix tests for Python 3.7. Remove with the next release 17 (fetchpatch { 18 url = https://github.com/Simplistix/testfixtures/commit/6e8807543b804946aba58e2c9e92f5bdc3656a57.patch; 19 sha256 = "1584jz2qz04arx8z8f6d1l1vab7gi38k3akzm223rmp7j4m7yrii"; 20 }) 21 ]; 22 23 checkPhase = '' 24 # django is too much hasle to setup at the moment 25 pytest -W ignore::DeprecationWarning --ignore=testfixtures/tests/test_django testfixtures/tests 26 ''; 27 28 meta = with stdenv.lib; { 29 homepage = https://github.com/Simplistix/testfixtures; 30 description = "A collection of helpers and mock objects for unit tests and doc tests"; 31 license = licenses.mit; 32 }; 33}