add test to check that doit runs successfully

This commit is contained in:
codl 2018-08-13 14:41:28 +02:00
parent 9713e72bc6
commit 8f013a7bc7
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
2 changed files with 17 additions and 0 deletions

8
test/conftest.py Normal file
View File

@ -0,0 +1,8 @@
import sys
from pathlib import Path
PROJDIR = str(Path(__file__).parent.parent)
if PROJDIR not in sys.path:
print(PROJDIR)
sys.path.append(PROJDIR)

9
test/test_doit.py Normal file
View File

@ -0,0 +1,9 @@
import dodo
import doit
from unittest.mock import patch
def test_doit():
with patch('sys.exit') as exit:
doit.run(dodo)
exit.assert_called_with(0)