diff --git a/test/test_doit.py b/test/test_doit.py index 160775d..0d122fb 100644 --- a/test/test_doit.py +++ b/test/test_doit.py @@ -4,6 +4,7 @@ from unittest.mock import patch def test_doit(): - with patch('sys.exit') as exit: - doit.run(dodo) - exit.assert_called_with(0) + with patch('sys.exit') as _exit: + with patch('sys.argv') as argv: + doit.run(dodo) + _exit.assert_called_with(0)