Skip to content

Commit d77d6df

Browse files
authored
Add Hypothesis property tests for blob/bubble parsing (#71) (#81)
* initial implementation * improved for issues * fix: Remove dead return None in _assemble_workspace_bubble when bubble_id isn’t a str. * fix: resolve findings from coderabbitai's review report * fix: _assemble_workspace_bubble doesn't truly mirror production. * fix: classify_blob_data widens the except list unnecessarily * fix: _BUBBLE_LIKE doesn't directly cover the bug text_extract.py fixes * fix: test_traverse_blobs_never_raises skips the meta-parse error path * fix: comment slightly misleading
1 parent adb75a4 commit d77d6df

9 files changed

Lines changed: 417 additions & 27 deletions

File tree

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ jobs:
9898

9999
- name: Install runtime + test dependencies
100100
# Install from the pinned lock file for deterministic dependency
101-
# resolution (closes #47). pytest is added on top — it is not in
102-
# requirements-lock.txt because it is a dev-only dep. pywebview is
101+
# resolution (closes #47). pytest and hypothesis are added on top — not in
102+
# requirements-lock.txt (dev-only). pywebview is
103103
# the desktop-launcher dep and pulls GTK / Qt system libraries on
104104
# Linux — intentionally excluded from the CI unittest matrix.
105105
run: |
106106
python -m pip install --upgrade pip
107107
python -m pip install -r requirements-lock.txt
108-
python -m pip install 'pytest>=8,<9'
108+
python -m pip install 'pytest>=8,<9' 'hypothesis>=6.100,<7'
109109
110110
- name: Run unittest suite
111111
run: python -m unittest discover tests -v

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ Thumbs.db
4343
.coverage
4444
htmlcov/
4545
coverage.xml
46+
.hypothesis/

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ source venv/bin/activate
6161
pip install -r requirements.txt
6262
```
6363

64+
For development (pytest, mypy, Hypothesis property tests):
65+
66+
```bash
67+
pip install -e ".[dev]"
68+
```
69+
6470
For reproducible installs (same versions as CI), use the pinned lock file:
6571

6672
```bash

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ desktop = ["pywebview>=5.0,<6"]
3232
dev = [
3333
"pytest>=8,<9",
3434
"mypy>=1.10,<2",
35+
"hypothesis>=6.100,<7",
3536
]
3637

3738
[project.scripts]

0 commit comments

Comments
 (0)