2022-10-01 09:49:29 +02:00
|
|
|
Index: pyudev-0.24.0/tests/test_enumerate.py
|
|
|
|
===================================================================
|
|
|
|
--- pyudev-0.24.0.orig/tests/test_enumerate.py
|
|
|
|
+++ pyudev-0.24.0/tests/test_enumerate.py
|
|
|
|
@@ -88,7 +88,7 @@ class TestEnumerator(object):
|
2021-08-10 18:42:40 +02:00
|
|
|
|
|
|
|
@failed_health_check_wrapper
|
|
|
|
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
|
|
|
|
- @settings(max_examples=10)
|
|
|
|
+ @settings(max_examples=10, deadline=None)
|
|
|
|
def test_match_subsystem(self, context, subsystem):
|
|
|
|
"""
|
|
|
|
Subsystem match matches devices w/ correct subsystem.
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -113,7 +113,7 @@ class TestEnumerator(object):
|
2021-08-10 14:54:01 +02:00
|
|
|
|
|
|
|
@failed_health_check_wrapper
|
|
|
|
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
|
|
|
|
- @settings(max_examples=1)
|
|
|
|
+ @settings(max_examples=1, deadline=500)
|
|
|
|
def test_match_subsystem_nomatch_complete(self, context, subsystem):
|
|
|
|
"""
|
|
|
|
Test that w/ respect to the universe of devices returned by
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -131,7 +131,7 @@ class TestEnumerator(object):
|
2022-01-17 07:50:42 +01:00
|
|
|
|
|
|
|
@failed_health_check_wrapper
|
2022-03-11 00:07:17 +01:00
|
|
|
@given(_CONTEXT_STRATEGY, _MATCH_PROPERTY_STRATEGY.filter(lambda x: _is_bool(x[1])))
|
|
|
|
- @settings(max_examples=10)
|
|
|
|
+ @settings(max_examples=10, deadline=500)
|
|
|
|
def test_match_property_bool(self, context, pair):
|
2022-01-17 07:50:42 +01:00
|
|
|
"""
|
2022-03-11 00:07:17 +01:00
|
|
|
Verify that a probably boolean property lookup works.
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -149,7 +149,7 @@ class TestEnumerator(object):
|
2022-03-11 00:07:17 +01:00
|
|
|
@given(
|
|
|
|
_CONTEXT_STRATEGY, device_strategy(filter_func=lambda d: d.parent is not None)
|
2022-01-17 07:03:59 +01:00
|
|
|
)
|
2022-03-11 00:07:17 +01:00
|
|
|
- @settings(max_examples=5)
|
|
|
|
+ @settings(max_examples=5, deadline=500)
|
|
|
|
def test_match_parent(self, context, device):
|
2022-01-17 07:03:59 +01:00
|
|
|
"""
|
2022-03-11 00:07:17 +01:00
|
|
|
For a given device, verify that it is in its parent's children.
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -175,7 +175,7 @@ class TestEnumeratorMatchCombinations(ob
|
2022-01-17 07:50:42 +01:00
|
|
|
_SYSNAME_STRATEGY,
|
|
|
|
_MATCH_PROPERTY_STRATEGY,
|
|
|
|
)
|
|
|
|
- @settings(max_examples=10)
|
|
|
|
+ @settings(max_examples=10, deadline=500)
|
|
|
|
def test_match(self, context, subsystem, sysname, ppair):
|
|
|
|
"""
|
|
|
|
Test that matches from different categories are a conjunction.
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -231,7 +231,7 @@ class TestEnumeratorMatchMethod(object):
|
2022-03-11 00:07:17 +01:00
|
|
|
match_sys_name.assert_called_with(mock.sentinel.sys_name)
|
|
|
|
|
|
|
|
@given(_ENUMERATOR_STRATEGY)
|
|
|
|
- @settings(max_examples=1)
|
|
|
|
+ @settings(max_examples=1, deadline=500)
|
|
|
|
def test_match_passthrough_tag(self, enumerator):
|
|
|
|
"""
|
|
|
|
Test that special keyword tag results in a match_tag call.
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -242,7 +242,7 @@ class TestEnumeratorMatchMethod(object):
|
2022-03-11 00:07:17 +01:00
|
|
|
|
|
|
|
@_UDEV_TEST(172, "test_match_passthrough_parent")
|
|
|
|
@given(_ENUMERATOR_STRATEGY)
|
|
|
|
- @settings(max_examples=1)
|
|
|
|
+ @settings(max_examples=1, deadline=500)
|
|
|
|
def test_match_passthrough_parent(self, enumerator):
|
|
|
|
"""
|
|
|
|
Test that special keyword 'parent' results in a match parent call.
|
2022-10-01 09:49:29 +02:00
|
|
|
@@ -254,7 +254,7 @@ class TestEnumeratorMatchMethod(object):
|
2022-03-11 00:07:17 +01:00
|
|
|
match_parent.assert_called_with(mock.sentinel.parent)
|
|
|
|
|
|
|
|
@given(_ENUMERATOR_STRATEGY)
|
|
|
|
- @settings(max_examples=1)
|
|
|
|
+ @settings(max_examples=1, deadline=500)
|
|
|
|
def test_match_passthrough_property(self, enumerator):
|
|
|
|
"""
|
|
|
|
Test that non-special keyword args are treated as properties.
|