aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/01_test_help.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/01_test_help.py
parent57c671b7f2050edfb5a6e01330c2391bde04dbb5 (diff)
Use assertRaises as context manager
for better readability Gbp-Dch: Ignore
Diffstat (limited to 'tests/01_test_help.py')
-rw-r--r--tests/01_test_help.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/01_test_help.py b/tests/01_test_help.py
index c4cc34ea..ed085ba7 100644
--- a/tests/01_test_help.py
+++ b/tests/01_test_help.py
@@ -29,8 +29,7 @@ class TestHelp(TestCaseWithData):
def testHelp(self, script):
module = 'gbp.scripts.%s' % script
m = __import__(module, globals(), locals(), ['main'], 0)
- self.assertRaises(SystemExit,
- m.main,
- ['doesnotmatter', '--help'])
+ with self.assertRaises(SystemExit):
+ m.main(['doesnotmatter', '--help'])
# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: