Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 9, 2025
1 parent 9806189 commit 1227b13
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def request(self, method, path, **kwargs):
**response_kwargs,
request=httpx.Request(method=method, url=path),
)
assert False, f"No response found for kwargs {request_kwargs}\nExpected answers are {self.responses}"
assert False, (
f"No response found for kwargs {request_kwargs}\nExpected answers are {self.responses}"
)

def __getattr__(self, value):
if value in ["get", "post", "patch", "delete", "put"]:
Expand Down Expand Up @@ -201,14 +203,16 @@ def __init__(self):
def command(self, command, *args, env=None):
args = " ".join(("git", command, *args))
if not self.expected_calls:
assert (
False
), f"Received command `{args}` with env {env} while expecting nothing."
assert False, (
f"Received command `{args}` with env {env} while expecting nothing."
)

call = self.expected_calls[0]
exp_args, exp_env, exit_code, stdout = call
if not (args == exp_args and (not exp_env or exp_env == env)):
assert False, f"Expected command is not `{args}` with env {env}\nExpected command is {self.expected_calls[0]}"
assert False, (
f"Expected command is not `{args}` with env {env}\nExpected command is {self.expected_calls[0]}"
)

self.expected_calls.pop(0)
if exit_code == 0:
Expand Down

0 comments on commit 1227b13

Please sign in to comment.