Skip to content

Commit f1dadf1

Browse files
Add a unittest for JSONReporter with score
1 parent 8bf1e46 commit f1dadf1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/unittest_reporters_json.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
]
3737

3838

39+
def test_simple_json_output_with_score():
40+
report = get_linter_result(score=True)
41+
assert len(report) == 2
42+
report_result = [sorted(report[0].items(), key=lambda item: item[0])]
43+
assert report_result == expected_result
44+
assert report[1] == {"score": expected_score_message}
45+
46+
3947
def test_simple_json_output_no_score():
4048
report = get_linter_result(score=False)
4149
assert len(report) == 1

0 commit comments

Comments
 (0)