From: 
Subject: Debian changes

The Debian packaging of python-powerfox is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/python-powerfox
    % cd python-powerfox
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone python-powerfox`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/tests/conftest.py b/tests/conftest.py
index f9ace7e..d776e18 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,13 +1,61 @@
 """Fixtures for the Powerfox tests."""
 
+import dataclasses
 from collections.abc import AsyncGenerator
+from typing import Any
 
 import pytest
 from aiohttp import ClientSession
+from syrupy.assertion import SnapshotAssertion
+from syrupy.extensions.amber import (
+    AmberDataSerializer,
+    AmberDataSerializerPlugin,
+    AmberSnapshotExtension,
+)
+from syrupy.extensions.amber.serializer import attr_getter
+from syrupy.types import SerializableData
 
 from powerfox import Powerfox, PowerfoxLocal
 
 
+class DataclassSerializerPlugin(AmberDataSerializerPlugin):
+    """Serialize dataclasses consistently across Syrupy versions."""
+
+    @classmethod
+    def is_data_serializable(cls, data: SerializableData) -> bool:
+        """Return whether data is a dataclass instance."""
+        return dataclasses.is_dataclass(data) and not isinstance(data, type)
+
+    @classmethod
+    def serialize(cls, data: SerializableData, **kwargs: Any) -> str:
+        """Serialize a dataclass as a sorted collection of its fields."""
+        keys = sorted(field.name for field in dataclasses.fields(data))
+        return PowerfoxSnapshotSerializer.serialize_custom_iterable(
+            data=data,
+            resolve_entries=(keys, attr_getter, None),
+            separator="=",
+            **kwargs,
+        )
+
+
+class PowerfoxSnapshotSerializer(AmberDataSerializer):
+    """Amber serializer with dataclass support on Syrupy 5 and 6."""
+
+    serializer_plugins = (DataclassSerializerPlugin,)
+
+
+class PowerfoxSnapshotExtension(AmberSnapshotExtension):
+    """Snapshot extension using the compatible dataclass serializer."""
+
+    serializer_class = PowerfoxSnapshotSerializer
+
+
+@pytest.fixture
+def snapshot(snapshot: SnapshotAssertion) -> SnapshotAssertion:
+    """Return a snapshot assertion with stable dataclass serialization."""
+    return snapshot.use_extension(PowerfoxSnapshotExtension)
+
+
 @pytest.fixture(name="powerfox_client")
 async def client() -> AsyncGenerator[Powerfox, None]:
     """Return a Powerfox client."""
