Page MenuHomeSoftware Heritage

D648.id2062.diff
No OneTemporary

D648.id2062.diff

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

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

Event Timeline