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 Sep 5, 2024
1 parent 19e4866 commit bd6f768
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/test_sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,9 @@ def socket_path_or_str(self, request: SubRequest, socket_path: Path) -> Path | s
@pytest.fixture(
params=[
pytest.param("path", id="path-peer"),
pytest.param("abstract", marks=[skip_unix_abstract_mark], id="abstract-peer"),
pytest.param(
"abstract", marks=[skip_unix_abstract_mark], id="abstract-peer"
),
]
)
def peer_socket_path(self) -> Generator[Path, None, None]:
Expand Down Expand Up @@ -1693,8 +1695,12 @@ async def test_extra_attributes(
raw_socket = unix_dg.extra(SocketAttribute.raw_socket)
assert raw_socket is not None
assert unix_dg.extra(SocketAttribute.family) == AddressFamily.AF_UNIX
assert os.fsencode(unix_dg.extra(SocketAttribute.local_address)) == os.fsencode(socket_path)
assert os.fsencode(unix_dg.extra(SocketAttribute.remote_address)) == os.fsencode(peer_socket_path)
assert os.fsencode(
unix_dg.extra(SocketAttribute.local_address)
) == os.fsencode(socket_path)
assert os.fsencode(
unix_dg.extra(SocketAttribute.remote_address)
) == os.fsencode(peer_socket_path)
pytest.raises(
TypedAttributeLookupError, unix_dg.extra, SocketAttribute.local_port
)
Expand Down

0 comments on commit bd6f768

Please sign in to comment.