diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-05-20 15:08:02 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-05-20 15:08:02 -0400 |
commit | 15a5dd52d794ae8186097db1e93b305e5c4b616c (patch) | |
tree | c018c63ad817b93ad14dec83207e7decb60bb0c9 /tests/test_api.py | |
parent | a94406e7001f027ef5fa941de4193b286bfcaf92 (diff) | |
download | python-coveragepy-15a5dd52d794ae8186097db1e93b305e5c4b616c.tar.gz |
Clean ups
Diffstat (limited to 'tests/test_api.py')
-rw-r--r-- | tests/test_api.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index 55cdbe8..f4ab2ba 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -571,8 +571,11 @@ class ReporterDeprecatedAttributeTest(CoverageTest): def test_reporter_file_reporters(self): rep = Reporter(None, None) + with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") - rep.file_reporters + # Accessing this attribute will raise a DeprecationWarning. + rep.file_reporters # pylint: disable=pointless-statement + self.assertEqual(len(warns), 1) self.assertTrue(issubclass(warns[0].category, DeprecationWarning)) |