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

Commit 6009eff

Browse files
committed
fix: address feedback
1 parent 264e218 commit 6009eff

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

graphql_api/tests/test_test_analytics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ def test_test_suites_no_term(self) -> None:
11381138
)
11391139
res = self.fetch_test_analytics(
11401140
repo.name,
1141-
"""testSuites(term: "hello")""",
1141+
"""testSuites""",
11421142
)
11431143
assert sorted(res["testSuites"]) == ["goodbye_world", "hello_world"]
11441144

@@ -1172,6 +1172,6 @@ def test_flags_no_term(self) -> None:
11721172

11731173
res = self.fetch_test_analytics(
11741174
repo.name,
1175-
"""flags(term: "hello")""",
1175+
"""flags""",
11761176
)
11771177
assert sorted(res["flags"]) == ["goodbye_world", "hello_world"]

utils/test_results.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,12 @@ def compare(row: TestResultsRow) -> int:
271271
row_value = getattr(row, ordering)
272272
row_value_str = str(row_value)
273273
cursor_value_str = cursor.ordered_value
274+
row_is_greater = row_value_str > cursor_value_str
275+
row_is_less = row_value_str < cursor_value_str
274276
if descending:
275-
return (row_value_str < cursor_value_str) - (
276-
row_value_str > cursor_value_str
277-
)
277+
return row_is_less - row_is_greater
278278
else:
279-
return (row_value_str > cursor_value_str) - (
280-
row_value_str < cursor_value_str
281-
)
279+
return row_is_greater - row_is_less
282280

283281
left, right = 0, len(rows) - 1
284282
while left <= right:

utils/tests/unit/test_search_base_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_search_base_query_with_missing_cursor_low_name_high_failure_rate():
5353
assert res == rows[-1:]
5454

5555

56-
def test_search_base_query_with_missing_cursor_low_name_high_failure_rate_desc():
56+
def test_search_base_query_descending():
5757
# [(2, "0.2"), (1, "0.1"), (0, "0.0")]
5858
# ^
5959
# here's where the cursor is pointing at

0 commit comments

Comments
 (0)