diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-08-18 20:21:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-08-18 20:21:46 +0000 |
commit | bddee63922e227c73fd1b4e5b50bbef56bb9a61f (patch) | |
tree | ee729b4d2250e2935a4922f120637a68ed91db17 /tests/test_info.py | |
parent | Initial commit. (diff) | |
download | gita-bddee63922e227c73fd1b4e5b50bbef56bb9a61f.tar.xz gita-bddee63922e227c73fd1b4e5b50bbef56bb9a61f.zip |
Adding upstream version 0.10.9.upstream/0.10.9
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_info.py')
-rw-r--r-- | tests/test_info.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_info.py b/tests/test_info.py new file mode 100644 index 0000000..025aedc --- /dev/null +++ b/tests/test_info.py @@ -0,0 +1,16 @@ +import subprocess +from unittest.mock import patch, MagicMock + +from gita import info + + +@patch('subprocess.run') +def test_run_quiet_diff(mock_run): + mock_return = MagicMock() + mock_run.return_value = mock_return + got = info.run_quiet_diff(['my', 'args']) + mock_run.assert_called_once_with( + ['git', 'diff', '--quiet', 'my', 'args'], + stderr=subprocess.DEVNULL, + ) + assert got == mock_return.returncode |