From b1a594511c20ee82588d4987fe50b9ff3aee79bc Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 22 Jul 2015 12:14:38 -0400 Subject: Don't write a plugins key if there are no plugins. --- tests/test_data.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test_data.py') diff --git a/tests/test_data.py b/tests/test_data.py index ea33a58..ef058e5 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -498,6 +498,8 @@ class CoverageDataFilesTest(DataTestHelpers, CoverageTest): self.assertCountEqual(lines['b.py'], B_PY_LINES_1) # If not measuring branches, there's no arcs entry. self.assertNotIn('arcs', data) + # If no plugins were involved, there's no plugins entry. + self.assertNotIn('plugins', data) def test_file_format_with_arcs(self): # Write with CoverageData, then read the JSON explicitly. @@ -513,6 +515,8 @@ class CoverageDataFilesTest(DataTestHelpers, CoverageTest): self.assertCountEqual(arcs.keys(), MEASURED_FILES_3) self.assertCountEqual(arcs['x.py'], map(list, X_PY_ARCS_3)) self.assertCountEqual(arcs['y.py'], map(list, Y_PY_ARCS_3)) + # If no plugins were involved, there's no plugins entry. + self.assertNotIn('plugins', data) def test_writing_to_other_file(self): data_files = CoverageDataFiles(".otherfile") -- cgit v1.2.1