con / con/mechababs

`test_the_member_hint_appears_only_for_a_member` fails when the checkout path contains "superstudy"

Open Beginner friendly
#159 0 comments 0 reactions 0 assignees View on GitHub
automation
Dominant language
Python
Stars
1
Forks
4
Avg merge
15h 39m
Merged PRs (30d)
24

Description

`tests/test_campaign.py::test_the_member_hint_appears_only_for_a_member` asserts `"superstudy" not in str(e.value)`, but the refusal message embeds the running venv's absolute path. Any checkout whose path contains the word fails spuriously (`.worktrees/status-superstudy` did; dodged by renaming the branch).

Fix: assert on the hint sentence (`update-env --study`) instead of the bare word, and check the other `not in str(e.value)` assertions for the same shape: a negative assertion against a word that can appear in an unrelated part of the message (a path, a label, a dataset id).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in tests/test_campaign.py at test_the_member_hint_appears_only_for_a_member and run that test to reproduce the path-dependent failure. Replace the bare-word negative check with an assertion about the update-env --study hint sentence, then inspect nearby str(e.value) negative assertions for the same false-positive shape. Done means the tests pass even when the checkout path contains superstudy and unrelated words are not used as exclusion evidence.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.