gitAndTools.gita: enable tests

This commit is contained in:
Oleg Pykhalov 2020-06-02 23:35:03 +03:00
parent abf309e005
commit a34547730f
No known key found for this signature in database
GPG key ID: 167F8EA5001AFA9C

View file

@ -1,6 +1,8 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, git
, pytest
, pyyaml
, setuptools
, installShellFiles
@ -24,6 +26,23 @@ buildPythonApplication rec {
nativeBuildInputs = [ installShellFiles ];
postUnpack = ''
for case in "\n" ""; do
substituteInPlace source/tests/test_main.py \
--replace "'gita$case'" "'source$case'"
done
'';
checkInputs = [
git
pytest
];
checkPhase = ''
git init
pytest tests
'';
postInstall = ''
installShellCompletion --bash --name gita ${src}/.gita-completion.bash
'';