gitAndTools.gita: enable tests
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonApplication
|
, buildPythonApplication
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, git
|
||||||
|
, pytest
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, setuptools
|
, setuptools
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
@@ -24,6 +26,23 @@ buildPythonApplication rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
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 = ''
|
postInstall = ''
|
||||||
installShellCompletion --bash --name gita ${src}/.gita-completion.bash
|
installShellCompletion --bash --name gita ${src}/.gita-completion.bash
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user