From 4bddf32cc43f160870d921c86aec926cb94082f1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 21 Feb 2024 06:01:19 -0600 Subject: [PATCH] Avoid the final write of every registry at the end of each test (#111053) --- tests/common.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/common.py b/tests/common.py index f1ed002bf8e6a8..dca847ff71c8f3 100644 --- a/tests/common.py +++ b/tests/common.py @@ -201,7 +201,17 @@ class StoreWithoutWriteLoad(storage.Store[_T]): """Fake store that does not write or load. Used for testing.""" async def async_save(self, *args: Any, **kwargs: Any) -> None: - """Save the data.""" + """Save the data. + + This function is mocked out in tests. + """ + + @callback + def async_save_delay(self, *args: Any, **kwargs: Any) -> None: + """Save data with an optional delay. + + This function is mocked out in tests. + """ @asynccontextmanager