Skip to content

Commit 26b4f62

Browse files
committed
fix failing test and rewrite comment
1 parent 3451867 commit 26b4f62

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

hypothesis-python/src/hypothesis/_settings.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,7 @@ def _validate_database(db: "ExampleDatabase") -> "ExampleDatabase":
440440
return db
441441
raise InvalidArgument(
442442
"Arguments to the database setting must be None or an instance of "
443-
f"ExampleDatabase. Try passing database=ExampleDatabase({db!r}), or "
444-
"construct and use one of the specific subclasses in "
443+
"ExampleDatabase. Try using one of the specific subclasses in "
445444
"hypothesis.database"
446445
)
447446

hypothesis-python/tests/nocover/test_flatmap.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import pytest
1414

1515
from hypothesis import HealthCheck, assume, given, settings
16-
from hypothesis.database import ExampleDatabase
16+
from hypothesis.database import InMemoryExampleDatabase
1717
from hypothesis.strategies import (
1818
booleans,
1919
builds,
@@ -55,7 +55,7 @@ def test_flatmap_retrieve_from_db():
5555
track = []
5656

5757
@given(floats(0, 1).flatmap(lambda x: lists(just(x))))
58-
@settings(database=ExampleDatabase())
58+
@settings(database=InMemoryExampleDatabase())
5959
def record_and_test_size(xs):
6060
if sum(xs) >= 1:
6161
track.append(xs)

0 commit comments

Comments
 (0)