add test to check that doit runs successfully
This commit is contained in:
parent
9713e72bc6
commit
8f013a7bc7
|
@ -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)
|
||||
|
|
@ -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)
|
Loading…
Reference in New Issue