diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-11-12 17:48:03 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-11-12 17:48:03 +0100 |
commit | dcf3e4f704285c7df84c425eb0fd8c3fecbc98c2 (patch) | |
tree | 85e09f927a33acccff32492b4aafdfc6a911a012 /tests/05_test_detection.py | |
parent | 57c671b7f2050edfb5a6e01330c2391bde04dbb5 (diff) |
Use assertRaises as context manager
for better readability
Gbp-Dch: Ignore
Diffstat (limited to 'tests/05_test_detection.py')
-rw-r--r-- | tests/05_test_detection.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/05_test_detection.py b/tests/05_test_detection.py index b72aa943..d2579dfa 100644 --- a/tests/05_test_detection.py +++ b/tests/05_test_detection.py @@ -72,13 +72,8 @@ class TestDetection(unittest.TestCase): open(self.tmpdir.join('source_1.2.orig.tar.gz'), "w").close() open(self.tmpdir.join('source_1.2.orig.tar.xz'), "w").close() repo = MockGitRepository(with_branch=False) - self.assertRaises( - GbpError, - export_orig.guess_comp_type, - 'auto', - self.source, - repo, - str(self.tmpdir)) + with self.assertRaises(GbpError): + export_orig.guess_comp_type('auto', self.source, repo, str(self.tmpdir)) def test_guess_comp_type_auto_bzip2(self): subject = 'pristine-tar data for source_1.2-3.orig.tar.bz2' |