mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 03:11:09 +00:00
Cover all code paths in search_commits (#2087)
The search_commits method was only very lightly tested, meaning over half of it was not covered. Write another test case, covering all code paths.
This commit is contained in:
+3
-7
@@ -598,19 +598,15 @@ class Github:
|
||||
"""
|
||||
assert isinstance(query, str), query
|
||||
url_parameters = dict()
|
||||
if (
|
||||
sort is not github.GithubObject.NotSet
|
||||
): # pragma no branch (Should be covered)
|
||||
if sort is not github.GithubObject.NotSet:
|
||||
assert sort in ("author-date", "committer-date"), sort
|
||||
url_parameters["sort"] = sort
|
||||
if (
|
||||
order is not github.GithubObject.NotSet
|
||||
): # pragma no branch (Should be covered)
|
||||
if order is not github.GithubObject.NotSet:
|
||||
assert order in ("asc", "desc"), order
|
||||
url_parameters["order"] = order
|
||||
|
||||
query_chunks = []
|
||||
if query: # pragma no branch (Should be covered)
|
||||
if query:
|
||||
query_chunks.append(query)
|
||||
|
||||
for qualifier, value in qualifiers.items():
|
||||
|
||||
Reference in New Issue
Block a user