Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit a65bf87

Browse files
fix lint
1 parent f003a01 commit a65bf87

File tree

1 file changed

+48
-11
lines changed

1 file changed

+48
-11
lines changed

services/tests/test_components.py

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
from services.components import (
1717
ComponentComparison,
1818
commit_components,
19-
component_filtered_report, filter_components_by_name_or_id,
19+
component_filtered_report,
20+
filter_components_by_name_or_id,
2021
)
2122

2223

@@ -158,8 +159,8 @@ def test_base_report(self, base_report_mock):
158159
component_comparison = ComponentComparison(self.comparison, component_go)
159160
assert component_comparison.base_report.files == ["file_1.go"]
160161
assert (
161-
component_comparison.base_report.totals.coverage
162-
== report.get("file_1.go").totals.coverage
162+
component_comparison.base_report.totals.coverage
163+
== report.get("file_1.go").totals.coverage
163164
)
164165

165166
@patch("services.comparison.Comparison.head_report", new_callable=PropertyMock)
@@ -176,8 +177,8 @@ def test_head_report(self, head_report_mock):
176177
component_comparison = ComponentComparison(self.comparison, component_go)
177178
assert component_comparison.head_report.files == ["file_1.go"]
178179
assert (
179-
component_comparison.head_report.totals.coverage
180-
== report.get("file_1.go").totals.coverage
180+
component_comparison.head_report.totals.coverage
181+
== report.get("file_1.go").totals.coverage
181182
)
182183

183184
@patch("services.comparison.Comparison.git_comparison", new_callable=PropertyMock)
@@ -224,9 +225,27 @@ def test_patch_totals(self, head_report_mock, git_comparison_mock):
224225

225226
def test_filter_components_by_name_or_id(self):
226227
components = [
227-
Component(name="ComponentA", component_id="123", paths=[], flag_regexes=[], statuses=[]),
228-
Component(name="ComponentB", component_id="456", paths=[], flag_regexes=[], statuses=[]),
229-
Component(name="ComponentC", component_id="789", paths=[], flag_regexes=[], statuses=[]),
228+
Component(
229+
name="ComponentA",
230+
component_id="123",
231+
paths=[],
232+
flag_regexes=[],
233+
statuses=[],
234+
),
235+
Component(
236+
name="ComponentB",
237+
component_id="456",
238+
paths=[],
239+
flag_regexes=[],
240+
statuses=[],
241+
),
242+
Component(
243+
name="ComponentC",
244+
component_id="789",
245+
paths=[],
246+
flag_regexes=[],
247+
statuses=[],
248+
),
230249
]
231250
terms = ["comPOnentA", "123", "456"]
232251

@@ -237,9 +256,27 @@ def test_filter_components_by_name_or_id(self):
237256

238257
def test_filter_components_by_name_or_id_no_matches(self):
239258
components = [
240-
Component(name="ComponentA", component_id="123", paths=[], flag_regexes=[], statuses=[]),
241-
Component(name="ComponentB", component_id="456", paths=[], flag_regexes=[], statuses=[]),
242-
Component(name="ComponentC", component_id="789", paths=[], flag_regexes=[], statuses=[]),
259+
Component(
260+
name="ComponentA",
261+
component_id="123",
262+
paths=[],
263+
flag_regexes=[],
264+
statuses=[],
265+
),
266+
Component(
267+
name="ComponentB",
268+
component_id="456",
269+
paths=[],
270+
flag_regexes=[],
271+
statuses=[],
272+
),
273+
Component(
274+
name="ComponentC",
275+
component_id="789",
276+
paths=[],
277+
flag_regexes=[],
278+
statuses=[],
279+
),
243280
]
244281
terms = ["nonexistent", "000"]
245282

0 commit comments

Comments
 (0)