From 521be8203abbcb8308311dd1584b311e5b476f1a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 21 Dec 2013 07:59:14 -0500 Subject: Use assertRaises as a context manager now that we can. --- tests/test_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_config.py') diff --git a/tests/test_config.py b/tests/test_config.py index 0862d6b2..7fa31208 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -94,7 +94,8 @@ class ConfigTest(CoverageTest): [run] timid = maybe? """) - self.assertRaises(CoverageException, coverage.coverage) + with self.assertRaises(CoverageException): + coverage.coverage() def test_environment_vars_in_config(self): # Config files can have $envvars in them. -- cgit v1.2.1