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 Feb 11, 2025
1 parent 76e85f5 commit 19b328a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pytest_postgresql/factories/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import platform
import subprocess
from pathlib import Path
from typing import Callable, Iterator, List, Optional, Tuple, Union, Iterable
from typing import Callable, Iterable, Iterator, List, Optional, Tuple, Union

import port_for
import pytest
Expand Down Expand Up @@ -54,7 +54,9 @@ def _pg_exe(executable: Optional[str], config: PostgresqlConfigDict) -> str:
return postgresql_ctl


def _pg_port(port: Optional[PortType], config: PostgresqlConfigDict, excluded_ports: Iterable[int]) -> int:
def _pg_port(
port: Optional[PortType], config: PostgresqlConfigDict, excluded_ports: Iterable[int]
) -> int:
"""User specified port, otherwise find an unused port from config."""
pg_port = get_port(port, excluded_ports) or get_port(config["port"], excluded_ports)
assert pg_port is not None
Expand Down
1 change: 1 addition & 0 deletions tests/test_template_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
dbname="stories_templated",
)


@pytest.mark.xdist_group(name="template_database")
@pytest.mark.parametrize("_", range(5))
def test_template_database(postgresql_template: Connection, _: int) -> None:
Expand Down

0 comments on commit 19b328a

Please sign in to comment.