python3Packages.diff-match-patch: fix build

Rather than using autodiscovery, the checkPhase should import
`__init__.py` from `diff_match_patch.tests to execute all relevant
tests. Otherwise several python2-related tests are executed in a py3 env
and break the build.

See also: https://hydra.nixos.org/build/102482273
This commit is contained in:
Maximilian Bosch 2019-10-11 21:48:30 +02:00
parent b32d6f1c16
commit b6237fb589
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E

View File

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi }:
{ lib, buildPythonPackage, fetchPypi, python }:
buildPythonPackage rec {
pname = "diff-match-patch";
@ -14,4 +14,8 @@ buildPythonPackage rec {
inherit pname version;
sha256 = "a809a996d0f09b9bbd59e9bbd0b71eed8c807922512910e05cbd3f9480712ddb";
};
checkPhase = ''
${python.interpreter} -m unittest -v diff_match_patch.tests
'';
}