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)

import dodo
import doit
from unittest.mock import patch


def test_doit():
    with patch('sys.exit') as _exit:
        with patch('sys.argv') as argv:
            doit.run(dodo)
            _exit.assert_called_with(0)

test doit: need to also mock sys.argv :/ :/ :/ :/