aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/11_test_dch_main.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-11-12 17:48:03 +0100
committerGuido Günther <agx@sigxcpu.org>2017-11-12 17:48:03 +0100
commitdcf3e4f704285c7df84c425eb0fd8c3fecbc98c2 (patch)
tree85e09f927a33acccff32492b4aafdfc6a911a012 /tests/11_test_dch_main.py
parent57c671b7f2050edfb5a6e01330c2391bde04dbb5 (diff)
Use assertRaises as context manager
for better readability Gbp-Dch: Ignore
Diffstat (limited to 'tests/11_test_dch_main.py')
-rw-r--r--tests/11_test_dch_main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/11_test_dch_main.py b/tests/11_test_dch_main.py
index f0f4560e..bebb1e4c 100644
--- a/tests/11_test_dch_main.py
+++ b/tests/11_test_dch_main.py
@@ -184,7 +184,8 @@ class TestScriptDch(DebianGitTestRepo):
"""Test dch.py like gbp dch script does: new upstream version - snapshot - release"""
options = ["--snapshot", "--release"]
with capture_stderr() as c:
- self.assertRaises(SystemExit, self.run_dch, options)
+ with self.assertRaises(SystemExit):
+ self.run_dch(options)
self.assertTrue("'--snapshot' and '--release' are incompatible options" in c.output())
def test_dch_main_new_upstream_version_with_distribution(self):