summaryrefslogtreecommitdiff
path: root/tests/component/rpm/test_buildpackage_rpm.py
diff options
context:
space:
mode:
authorJun Wang <junbill.wang@samsung.com>2016-03-18 21:49:38 +0800
committerJun Wang <junbill.wang@samsung.com>2016-03-18 22:10:03 +0800
commita50feeb6821e25201121997e214c237d9210152a (patch)
tree27994f38d97783583105a1cefdb0ed86540e9877 /tests/component/rpm/test_buildpackage_rpm.py
parentb31114407f241f6735f7f2348cf9b32d2209f8ca (diff)
downloadgit-buildpackage-a50feeb6821e25201121997e214c237d9210152a.tar.gz
git-buildpackage-a50feeb6821e25201121997e214c237d9210152a.tar.bz2
git-buildpackage-a50feeb6821e25201121997e214c237d9210152a.zip
Modify unit test cases which called 'assert_raises' function
to fix pre-review test bugs on CentOS_6. Change-Id: Ibb930eb107c18526876fc58428db359f9d31e716
Diffstat (limited to 'tests/component/rpm/test_buildpackage_rpm.py')
-rw-r--r--tests/component/rpm/test_buildpackage_rpm.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/component/rpm/test_buildpackage_rpm.py b/tests/component/rpm/test_buildpackage_rpm.py
index 88a66fc0..652b1528 100644
--- a/tests/component/rpm/test_buildpackage_rpm.py
+++ b/tests/component/rpm/test_buildpackage_rpm.py
@@ -101,8 +101,12 @@ class TestGbpRpm(RpmRepoTestBase):
def test_invalid_args(self):
"""Check graceful exit when called with invalid args"""
GitRepository.create('.')
+ assert_raises(SystemExit, mock_gbp, ['--git-invalid-arg'])
+
+ """
with assert_raises(SystemExit):
mock_gbp(['--git-invalid-arg'])
+ """
def test_outside_repo(self):
"""Run outside a git repository"""