Skip to content

Commit 780bb71

Browse files
committed
Require the bloom extra under CI so its tests never silently skip
The pybloomfilter skip guard keeps local runs green without the optional bloom extra, but CI installs it (.github/workflows/test.yml), so a missing pybloomfilter under CI is a broken setup, not an absent optional dependency. Re-raise the ImportError when the CI env var is set, so the bloom tests fail loudly rather than silently skipping and dropping coverage.
1 parent e750aca commit 780bb71

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

test/test_lshbloom.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@
99

1010
# pybloomfilter is an optional dependency (the `bloom` extra); the classes
1111
# above import fine without it but raise on use. Skip rather than error when
12-
# it is absent, as the GPU and storage-backend tests do for theirs.
12+
# it is absent, as the GPU and storage-backend tests do for theirs -- but the
13+
# `bloom` extra IS installed in CI (see .github/workflows/test.yml), so a
14+
# missing pybloomfilter under CI means a broken setup, not an optional-dep
15+
# absence: fail loudly there instead of silently dropping coverage.
1316
try:
1417
import pybloomfilter # noqa: F401
1518

1619
BLOOM_AVAILABLE = True
1720
except ImportError:
21+
if os.environ.get("CI"):
22+
raise
1823
BLOOM_AVAILABLE = False
1924

2025
_SKIP_REASON = "pybloomfilter not installed (pip install datasketch[bloom])"

0 commit comments

Comments
 (0)