Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163533
D648.id2062.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D648.id2062.diff
View Options
diff --git a/swh/storage/tests/test_storage.py b/swh/storage/tests/test_storage.py
--- a/swh/storage/tests/test_storage.py
+++ b/swh/storage/tests/test_storage.py
@@ -13,7 +13,7 @@
import psycopg2
import pytest
-from hypothesis import given
+from hypothesis import given, settings
from swh.model import from_disk, identifiers
from swh.model.hashutil import hash_to_bytes
@@ -1858,6 +1858,7 @@
actual_list = sorted([c[k] for c in actual_contents])
self.assertEqual(actual_list, expected_list)
+ @settings(max_examples=10)
@given(gen_contents(min_size=1, max_size=4))
def test_generate_content_get(self, contents):
# add contents to storage
@@ -1871,6 +1872,7 @@
self.assert_contents_ok(contents, actual_contents)
+ @settings(max_examples=10)
@given(gen_contents(min_size=1, max_size=4))
def test_generate_content_get_metadata(self, contents):
# add contents to storage
@@ -1899,6 +1901,7 @@
self.assertEqual(e.exception.args, (
'Development error: limit should not be None',))
+ @settings(max_examples=10)
@given(gen_contents(min_size=1, max_size=4))
def test_generate_content_get_range_no_limit(self, contents):
"""content_get_range returns contents within range provided"""
@@ -1924,6 +1927,7 @@
keys_to_check = set(one_content.keys()) - {'data'}
self.assert_contents_ok(contents, actual_contents, keys_to_check)
+ @settings(max_examples=10)
@given(gen_contents(min_size=4, max_size=4))
def test_generate_content_get_range_limit(self, contents):
"""content_get_range paginates results if limit exceeded"""
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 10:00 AM (19 h, 27 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225472
Attached To
D648: tests: Add hypothesis profile to run tests faster depending on location
Event Timeline
Log In to Comment