Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
pre-commit-ci[bot] committed Nov 28, 2023
1 parent 9754156 commit 37c38a2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/integration/test_pep517.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,9 @@
import sys

from pathlib import Path
from typing import Any, Callable, TYPE_CHECKING
from typing import TYPE_CHECKING
from typing import Any
from typing import Callable

import pytest

@@ -24,7 +26,9 @@
pytestmark = pytest.mark.integration


def verbose_called_process_error(test_function: Callable[..., None]) -> Callable[..., None]:
def verbose_called_process_error(
test_function: Callable[..., None]
) -> Callable[..., None]:
"""Decorator to emit verbose CalledProcessError details on stderr."""

@functools.wraps(test_function)
@@ -33,11 +37,11 @@ def verbose_called_process_error_wrapper(*args: Any, **kwargs: Any) -> None:
return test_function(*args, **kwargs)
except subprocess.CalledProcessError as error:
try:
stdout = error.stdout.decode('utf-8')
stdout = error.stdout.decode("utf-8")
except UnicodeError:
stdout = error.stdout
try:
stderr = error.stderr.decode('utf-8')
stderr = error.stderr.decode("utf-8")
except UnicodeError:
stderr = error.stderr
sys.stderr.write("\n---=============---\n")

0 comments on commit 37c38a2

Please sign in to comment.