2023-05-03 11:14:59 +02:00
|
|
|
Index: pyudev-0.24.1/pytest.ini
|
2022-10-01 09:49:29 +02:00
|
|
|
===================================================================
|
2023-05-03 11:14:59 +02:00
|
|
|
--- pyudev-0.24.1.orig/pytest.ini
|
|
|
|
+++ pyudev-0.24.1/pytest.ini
|
2020-10-09 13:43:31 +02:00
|
|
|
@@ -1,3 +1,6 @@
|
2020-10-09 01:03:46 +02:00
|
|
|
-[tool:pytest]
|
|
|
|
+[pytest]
|
|
|
|
# do not search for tests in build directory
|
|
|
|
norecursedirs = .* _* build
|
|
|
|
+markers =
|
|
|
|
+ conversion
|
2020-10-09 13:43:31 +02:00
|
|
|
+ real_udev
|
2023-05-03 11:14:59 +02:00
|
|
|
Index: pyudev-0.24.1/tests/_device_tests/_device_tests.py
|
2022-10-01 09:49:29 +02:00
|
|
|
===================================================================
|
2023-05-03 11:14:59 +02:00
|
|
|
--- pyudev-0.24.1.orig/tests/_device_tests/_device_tests.py
|
|
|
|
+++ pyudev-0.24.1/tests/_device_tests/_device_tests.py
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -212,6 +212,7 @@ class TestDevice(object):
|
2022-01-17 07:03:59 +01:00
|
|
|
if device.device_node:
|
|
|
|
assert is_unicode_string(device.device_node)
|
|
|
|
|
|
|
|
+ @pytest.mark.real_udev
|
|
|
|
@given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA))
|
|
|
|
@settings(max_examples=5)
|
|
|
|
def test_device_number(self, a_context, device_datum):
|
2023-05-03 11:14:59 +02:00
|
|
|
Index: pyudev-0.24.1/tests/_device_tests/_devices_tests.py
|
2022-10-01 09:49:29 +02:00
|
|
|
===================================================================
|
2023-05-03 11:14:59 +02:00
|
|
|
--- pyudev-0.24.1.orig/tests/_device_tests/_devices_tests.py
|
|
|
|
+++ pyudev-0.24.1/tests/_device_tests/_devices_tests.py
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -125,6 +125,7 @@ class TestDevices(object):
|
2022-01-17 07:03:59 +01:00
|
|
|
assert error.subsystem == "no_such_subsystem"
|
|
|
|
assert error.sys_name == "foobar"
|
2020-10-09 13:43:31 +02:00
|
|
|
|
|
|
|
+ @pytest.mark.real_udev
|
|
|
|
@failed_health_check_wrapper
|
|
|
|
@given(
|
|
|
|
_CONTEXT_STRATEGY,
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -140,6 +141,7 @@ class TestDevices(object):
|
2022-01-17 07:03:59 +01:00
|
|
|
device = Devices.from_device_number(a_context, typ, a_device.device_number)
|
2020-10-09 13:43:31 +02:00
|
|
|
assert a_device == device
|
|
|
|
|
|
|
|
+ @pytest.mark.real_udev
|
|
|
|
@failed_health_check_wrapper
|
|
|
|
@given(
|
|
|
|
_CONTEXT_STRATEGY,
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -175,6 +177,7 @@ class TestDevices(object):
|
2020-10-09 13:43:31 +02:00
|
|
|
with pytest.raises(DeviceNotFoundByNumberError):
|
2022-01-17 07:03:59 +01:00
|
|
|
Devices.from_device_number(_CONTEXT, "foobar", 100)
|
2020-10-09 13:43:31 +02:00
|
|
|
|
|
|
|
+ @pytest.mark.real_udev
|
|
|
|
@failed_health_check_wrapper
|
|
|
|
@given(
|
|
|
|
_CONTEXT_STRATEGY,
|
2023-05-03 11:14:59 +02:00
|
|
|
Index: pyudev-0.24.1/tests/test_enumerate.py
|
2022-10-01 09:49:29 +02:00
|
|
|
===================================================================
|
2023-05-03 11:14:59 +02:00
|
|
|
--- pyudev-0.24.1.orig/tests/test_enumerate.py
|
|
|
|
+++ pyudev-0.24.1/tests/test_enumerate.py
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -101,7 +101,7 @@ class TestEnumerator(object):
|
2022-01-17 07:03:59 +01:00
|
|
|
|
|
|
|
@failed_health_check_wrapper
|
|
|
|
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
|
2022-03-11 00:07:17 +01:00
|
|
|
- @settings(max_examples=5)
|
|
|
|
+ @settings(max_examples=5, deadline=None)
|
|
|
|
def test_match_subsystem_nomatch_unfulfillable(self, context, subsystem):
|
2022-01-17 07:03:59 +01:00
|
|
|
"""
|
2022-03-11 00:07:17 +01:00
|
|
|
Combining match and no match should give an empty result.
|
2023-05-03 11:14:59 +02:00
|
|
|
Index: pyudev-0.24.1/tests/test_util.py
|
2022-10-01 09:49:29 +02:00
|
|
|
===================================================================
|
2023-05-03 11:14:59 +02:00
|
|
|
--- pyudev-0.24.1.orig/tests/test_util.py
|
|
|
|
+++ pyudev-0.24.1/tests/test_util.py
|
|
|
|
@@ -119,6 +119,7 @@ def raise_valueerror():
|
2020-10-09 13:43:31 +02:00
|
|
|
_CHAR_DEVICES = list(_CONTEXT.list_devices(subsystem="tty"))
|
|
|
|
|
|
|
|
|
|
|
|
+@pytest.mark.real_udev
|
2022-01-17 07:03:59 +01:00
|
|
|
@pytest.mark.skipif(len(_CHAR_DEVICES) == 0, reason="no tty devices")
|
2020-10-09 13:43:31 +02:00
|
|
|
@given(strategies.sampled_from(_CHAR_DEVICES))
|
|
|
|
@settings(max_examples=5)
|
2023-05-03 11:14:59 +02:00
|
|
|
@@ -132,6 +133,7 @@ def test_get_device_type_character_devic
|
2020-10-09 13:43:31 +02:00
|
|
|
_BLOCK_DEVICES = list(_CONTEXT.list_devices(subsystem="block"))
|
|
|
|
|
|
|
|
|
|
|
|
+@pytest.mark.real_udev
|
2022-01-17 07:03:59 +01:00
|
|
|
@pytest.mark.skipif(len(_BLOCK_DEVICES) == 0, reason="no block devices")
|
2020-10-09 13:43:31 +02:00
|
|
|
@given(strategies.sampled_from(_BLOCK_DEVICES))
|
|
|
|
@settings(max_examples=5)
|