python-pyudev/support-pytest-8.patch
Steve Kowalik 5e47c674a3 - Update to 0.24.3:
* Tidies and Maintenance fixes
- Switch to pyproject macros.
- No more greedy globs in %files.
- Add patch support-pytest-8.patch:
  * Support pytest 8 changes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyudev?expand=0&rev=64
2024-05-15 05:00:48 +00:00

30 lines
1.0 KiB
Diff

From 536480579e8c1d7232725099e0a75a79950e4dcb Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Wed, 15 May 2024 14:51:13 +1000
Subject: [PATCH] Support pytest 8 changes.
pytest 8 removed the hook that was calling nose-specific methods, such
as setup and teardown. However, there is still support for that, the
methods just have _method on the end, so change them both.
---
tests/test_monitor.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_monitor.py b/tests/test_monitor.py
index cacd5040..4b49d094 100644
--- a/tests/test_monitor.py
+++ b/tests/test_monitor.py
@@ -277,10 +277,10 @@ def make_observer(self, monitor, use_deprecated=False):
self.observer = MonitorObserver(monitor, callback=self.callback)
return self.observer
- def setup(self):
+ def setup_method(self):
self.events = []
- def teardown(self):
+ def teardown_method(self):
self.events = None
def test_deprecated_handler(self, fake_monitor, fake_monitor_device):