Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9338571
D4842.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D4842.diff
View Options
diff --git a/swh/storage/tests/algos/test_snapshot.py b/swh/storage/tests/algos/test_snapshot.py
--- a/swh/storage/tests/algos/test_snapshot.py
+++ b/swh/storage/tests/algos/test_snapshot.py
@@ -3,7 +3,7 @@
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
-from hypothesis import given
+from hypothesis import HealthCheck, given, settings
import pytest
from swh.model.hypothesis_strategies import branch_names, branch_targets, snapshots
@@ -32,6 +32,7 @@
}
+@settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
@given(snapshot=snapshots(min_size=0, max_size=10, only_objects=False))
def test_snapshot_small(swh_storage, snapshot): # noqa
swh_storage.snapshot_add([snapshot])
@@ -40,6 +41,7 @@
assert snapshot == returned_snapshot
+@settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
@given(branch_name=branch_names(), branch_target=branch_targets(only_objects=True))
def test_snapshot_large(swh_storage, branch_name, branch_target): # noqa
snapshot = Snapshot(
diff --git a/swh/storage/tests/storage_tests.py b/swh/storage/tests/storage_tests.py
--- a/swh/storage/tests/storage_tests.py
+++ b/swh/storage/tests/storage_tests.py
@@ -420,7 +420,10 @@
assert missing == [cont2.hashes()]
@pytest.mark.property_based
- @settings(deadline=None) # this test is very slow
+ @settings(
+ deadline=None, # this test is very slow
+ suppress_health_check=[HealthCheck.function_scoped_fixture],
+ )
@given(
strategies.sets(
elements=strategies.sampled_from(["sha256", "sha1_git", "blake2s256"]),
@@ -451,6 +454,7 @@
) == set(missing_per_hash[hash])
@pytest.mark.property_based
+ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
@given(
strategies.sets(
elements=strategies.sampled_from(["sha256", "sha1_git", "blake2s256"]),
@@ -3920,7 +3924,12 @@
)
assert swh_storage.origin_count("github", regexp=True, with_visit=True) == 1
- @settings(suppress_health_check=[HealthCheck.too_slow])
+ @settings(
+ suppress_health_check=[
+ HealthCheck.too_slow,
+ HealthCheck.function_scoped_fixture,
+ ]
+ )
@given(strategies.lists(objects(split_content=True), max_size=2))
def test_add_arbitrary(self, swh_storage, objects):
for (obj_type, obj) in objects:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 8:56 AM (6 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217983
Attached To
D4842: Fix compatibility with hypothesis >= 5.49.0.
Event Timeline
Log In to Comment