Skip to content

Commit

Permalink
Black reformat tests/test_ctl.py
Browse files Browse the repository at this point in the history
Not sure why it was badly formatted before?
  • Loading branch information
dlax committed Nov 18, 2024
1 parent d9c95dd commit 0688b33
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/test_ctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,12 @@ def test_status(pgctl: ctl.PGCtl, returncode: int, status: ctl.Status) -> None:


def test_status_returncode1(pgctl: ctl.PGCtl) -> None:
with patch.object(
pgctl, "run_command", return_value=subprocess.CompletedProcess([], 1)
) as run_command, pytest.raises(subprocess.CalledProcessError):
with (
patch.object(
pgctl, "run_command", return_value=subprocess.CompletedProcess([], 1)
) as run_command,
pytest.raises(subprocess.CalledProcessError),
):
pgctl.status("data")
run_command.assert_called_once_with(["pg_ctl", "status", "-D", "data"])

Expand Down Expand Up @@ -194,9 +197,12 @@ async def test_status_async(

@pytest.mark.asyncio
async def test_status_returncode1_async(apgctl: ctl.AsyncPGCtl) -> None:
with patch.object(
apgctl, "run_command", return_value=subprocess.CompletedProcess([], 1)
) as run_command, pytest.raises(subprocess.CalledProcessError):
with (
patch.object(
apgctl, "run_command", return_value=subprocess.CompletedProcess([], 1)
) as run_command,
pytest.raises(subprocess.CalledProcessError),
):
await apgctl.status("data")
run_command.assert_called_once_with(["pg_ctl", "status", "-D", "data"])

Expand Down

0 comments on commit 0688b33

Please sign in to comment.