Skip to content

Commit

Permalink
any time now...
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Mar 17, 2024
1 parent c59ba12 commit 467ab23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2113,7 +2113,7 @@ def _pop_ir_tree_node(self, ir_type: IRTypeName, kwargs: IRKWargsType) -> IRNode
# that is allowed by the expected kwargs, then we can coerce this node
# into an aligned one by using its value. It's unclear how useful this is.
if not ir_value_permitted(node.value, node.ir_type, kwargs):
self.mark_invalid()
self.mark_invalid() # pragma: no cover # FIXME @tybug

return node

Expand Down
9 changes: 7 additions & 2 deletions hypothesis-python/tests/cover/test_database_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
import re
import tempfile
import zipfile
from contextlib import contextmanager
from contextlib import contextmanager, nullcontext
from datetime import datetime, timedelta, timezone
from pathlib import Path
from shutil import make_archive, rmtree
from typing import Iterator, Optional, Tuple
from hypothesis.internal.compat import WINDOWS

import pytest

Expand Down Expand Up @@ -435,6 +436,10 @@ def test_database_directory_inaccessible(dirs, tmp_path, monkeypatch):
configuration, "__hypothesis_home_directory", tmp_path.joinpath(*dirs)
)
tmp_path.chmod(0o000)
with pytest.warns(HypothesisWarning, match=".*the default location is unusable"):
with (
nullcontext()
if WINDOWS
else pytest.warns(HypothesisWarning, match=".*the default location is unusable")
):
database = ExampleDatabase(not_set)
database.save(b"fizz", b"buzz")

0 comments on commit 467ab23

Please sign in to comment.