2018-12-03 05:37:26 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, fetchpatch
|
|
|
|
, mock, pytest, sybil, zope_component }:
|
2017-11-07 12:36:48 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "testfixtures";
|
2018-12-03 05:37:26 +00:00
|
|
|
version = "6.3.0";
|
2017-11-07 12:36:48 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-12-03 05:37:26 +00:00
|
|
|
sha256 = "1x16xkw483nb1ngv74s7lgaj514pb1ldklal7kb7iwqbxcgnrh2k";
|
2017-11-07 12:36:48 +00:00
|
|
|
};
|
|
|
|
|
2018-12-03 05:37:26 +00:00
|
|
|
checkInputs = [ pytest mock sybil zope_component ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Fix tests for Python 3.7. Remove with the next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/Simplistix/testfixtures/commit/6e8807543b804946aba58e2c9e92f5bdc3656a57.patch;
|
|
|
|
sha256 = "1584jz2qz04arx8z8f6d1l1vab7gi38k3akzm223rmp7j4m7yrii";
|
|
|
|
})
|
|
|
|
];
|
2017-11-07 12:36:48 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# django is too much hasle to setup at the moment
|
2018-12-03 05:37:26 +00:00
|
|
|
pytest -W ignore::DeprecationWarning --ignore=testfixtures/tests/test_django testfixtures/tests
|
2017-11-07 12:36:48 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-12-03 05:37:26 +00:00
|
|
|
homepage = https://github.com/Simplistix/testfixtures;
|
|
|
|
description = "A collection of helpers and mock objects for unit tests and doc tests";
|
|
|
|
license = licenses.mit;
|
2017-11-07 12:36:48 +00:00
|
|
|
};
|
|
|
|
}
|