diff options
author | 2021-03-11 14:48:06 -0700 | |
---|---|---|
committer | 2021-03-11 19:50:30 -0700 | |
commit | 2ad4cea2315f66cfe0fe706852b417047726aede (patch) | |
tree | a81869dd322ad6a2c1b688c660129b5ff6bb1926 /tests | |
parent | pkgdev commit: use old repo name based on origin repo (diff) | |
download | pkgdev-2ad4cea2315f66cfe0fe706852b417047726aede.tar.gz pkgdev-2ad4cea2315f66cfe0fe706852b417047726aede.tar.bz2 pkgdev-2ad4cea2315f66cfe0fe706852b417047726aede.zip |
replace --ignore-failures with -A/--ask option
For `pkgdev commit` and `pkgdev push`.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/test_pkgdev_commit.py | 4 | ||||
-rw-r--r-- | tests/scripts/test_pkgdev_push.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/scripts/test_pkgdev_commit.py b/tests/scripts/test_pkgdev_commit.py index ba7486c..43c9666 100644 --- a/tests/scripts/test_pkgdev_commit.py +++ b/tests/scripts/test_pkgdev_commit.py @@ -3,6 +3,7 @@ import shutil import textwrap from datetime import datetime from functools import partial +from io import StringIO from unittest.mock import patch import pytest @@ -479,7 +480,8 @@ class TestPkgdevCommit: """) # ignore failures to create the commit - with patch('sys.argv', self.args + ['--scan', '--ignore-failures']), \ + with patch('sys.argv', self.args + ['--scan', '--ask']), \ + patch('sys.stdin', StringIO('y\n')), \ pytest.raises(SystemExit) as excinfo, \ chdir(git_repo.path): self.script() diff --git a/tests/scripts/test_pkgdev_push.py b/tests/scripts/test_pkgdev_push.py index 35a3e31..9a6c10c 100644 --- a/tests/scripts/test_pkgdev_push.py +++ b/tests/scripts/test_pkgdev_push.py @@ -1,6 +1,7 @@ import os import textwrap from functools import partial +from io import StringIO from unittest.mock import patch import pytest @@ -115,7 +116,8 @@ class TestPkgdevPush: """) # but failures can be ignored to push anyway - with patch('sys.argv', self.args + ['--ignore-failures']), \ + with patch('sys.argv', self.args + ['--ask']), \ + patch('sys.stdin', StringIO('y\n')), \ pytest.raises(SystemExit) as excinfo, \ chdir(self.child_git_repo.path): self.script() |