From 4a69532a6a99d934edbd3b014c8b49aca5de60f2 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 14 Jul 2026 01:45:31 +0200 Subject: [PATCH] home-assistant.python3Packages.pytest-homeassistant-custom-component: fix syrupy compat --- .../pytest-homeassistant-custom-component.nix | 4 ++++ .../home-assistant/syrupy-5.5-compat.patch | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/servers/home-assistant/syrupy-5.5-compat.patch diff --git a/pkgs/servers/home-assistant/pytest-homeassistant-custom-component.nix b/pkgs/servers/home-assistant/pytest-homeassistant-custom-component.nix index 7cc26ca6ebbe..f12a44dae422 100644 --- a/pkgs/servers/home-assistant/pytest-homeassistant-custom-component.nix +++ b/pkgs/servers/home-assistant/pytest-homeassistant-custom-component.nix @@ -31,6 +31,10 @@ buildPythonPackage rec { hash = "sha256-GUUz6gbhmIgZCH9y3oEmf1Y+Gp2yUf8zvxM//uGvsNw="; }; + patches = [ + ./syrupy-5.5-compat.patch + ]; + build-system = [ setuptools ]; pythonRemoveDeps = true; diff --git a/pkgs/servers/home-assistant/syrupy-5.5-compat.patch b/pkgs/servers/home-assistant/syrupy-5.5-compat.patch new file mode 100644 index 000000000000..6daa3478612b --- /dev/null +++ b/pkgs/servers/home-assistant/syrupy-5.5-compat.patch @@ -0,0 +1,22 @@ +diff --git a/src/pytest_homeassistant_custom_component/syrupy.py b/src/pytest_homeassistant_custom_component/syrupy.py +index 2eadcd3..2f90ab6 100644 +--- a/src/pytest_homeassistant_custom_component/syrupy.py ++++ b/src/pytest_homeassistant_custom_component/syrupy.py +@@ -22,7 +22,7 @@ from syrupy.location import PyTestLocation + from syrupy.report import SnapshotReport + from syrupy.session import ItemStatus, SnapshotSession + from syrupy.types import PropertyFilter, PropertyMatcher, PropertyPath, SerializableData +-from syrupy.utils import is_xdist_controller, is_xdist_worker ++from syrupy.utils import is_xdist_worker + import voluptuous as vol + import voluptuous_serialize + +@@ -410,8 +410,6 @@ def override_syrupy_finish(self: SnapshotSession) -> int: + indent=2, + ) + return exitstatus +- if is_xdist_controller(): +- return exitstatus + + if needs_xdist_merge: + worker_count = None