Skip to content

Commit 527ab13

Browse files
committed
fix test on ci
1 parent 52e09ea commit 527ab13

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

hypothesis-python/tests/cover/test_filestorage.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@ def test_storage_directories_are_not_created_automatically(tmp_path):
5353

5454
def _gitignore_storage_dir_script(*, home_dir=None):
5555
return textwrap.dedent(f"""
56-
from hypothesis import given, strategies as st
56+
from hypothesis import given, settings, strategies as st
5757
from hypothesis.configuration import set_hypothesis_home_dir
5858
5959
home_dir = {repr(str(home_dir)) if home_dir is not None else None}
6060
if home_dir:
6161
set_hypothesis_home_dir(home_dir)
6262
63+
# in CI we use the "ci" profile which sets database=None. But we actually want
64+
# disk writes to happen here so we can test the .hypothesis/.gitignore behavior.
65+
settings.load_profile("default")
66+
6367
@given(st.integers())
6468
def f(n):
6569
# fail to guarantee we write a file to .hypothesis/examples

0 commit comments

Comments
 (0)