python3Packages.regex: enable tests

This commit is contained in:
Fabian Affolter 2021-04-23 16:49:06 +02:00 committed by Jonathan Ringer
parent d3db53a741
commit 556bf69c40
No known key found for this signature in database
GPG key ID: 5C841D3CFDFEC4E0

View file

@ -2,6 +2,7 @@
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, python , python
, isPy27
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -13,14 +14,12 @@ buildPythonPackage rec {
sha256 = "sha256-Uro9P5uULEnX5LwQW7KFUcRAZfE5plBiq3kSvvEMmvs="; sha256 = "sha256-Uro9P5uULEnX5LwQW7KFUcRAZfE5plBiq3kSvvEMmvs=";
}; };
postCheck = '' # Sources for different Python releases are located in same folder
echo "We now run tests ourselves, since the setuptools installer doesn't." checkPhase = ''
${python.interpreter} -c 'import test_regex; test_regex.test_main();' rm -r ${if !isPy27 then "regex_2" else "regex_3"}
${python.interpreter} -m unittest
''; '';
# No tests in archive
doCheck = false;
pythonImportsCheck = [ "regex" ]; pythonImportsCheck = [ "regex" ];
meta = with lib; { meta = with lib; {