test(cli): test_bold_accent_renders_styled_not_bare fails only when its file runs as a whole
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- cli, testing-qa
Research direction
Start with the three pytest commands in the issue, then inspect the autouse fixture in tests/test_cli_theme.py:21 and module-level state in raven/cli/_theme.py. Compare the earlier tests in that file with test_bold_accent_renders_styled_not_bare to identify what is not restored. Done means the individual test and the full tests/test_cli_theme.py and tests/ runs pass with the truecolor accent preserved.
Written by the indexing model from the issue text.
Description
test_bold_accent_renders_styled_not_bare passes alone and fails when its file runs as a whole, so any full-suite run shows one red that has nothing to do with the change under test.
Reproducing
uv run pytest tests/test_cli_theme.py::test_bold_accent_renders_styled_not_bare # passes
uv run pytest tests/test_cli_theme.py # fails
uv run pytest tests/ # fails
-p no:randomly does not change it, so this is not ordering randomisation.
What actually differs
AssertionError: expected bold + accent(#fbe23f) ANSI, got '\x1b[1;93mX\x1b[0m'
assert '1;38;2;251;226;63' in '\x1b[1;93mX\x1b[0m'
Worth noting what 93 is: bright yellow from the 8-colour palette. The test constructs its own Console(color_system="truecolor", force_terminal=True), so this is not the console degrading its colour depth -- it is emitting a named colour. The accent resolved to something like yellow rather than to #fbe23f, and Rich rendered the name.
So the leak is in the theme the console was handed, not in terminal detection.
Where to look
tests/test_cli_theme.py:21 has an autouse fixture that resets _theme._cache and clears RAVEN_THEME, RAVEN_TERM_BACKGROUND, COLORFGBG, CI, SSH_CONNECTION, SSH_TTY before each test, and nulls the cache again afterwards. Whatever survives between tests is therefore not one of those, and not the cache -- some other module-level state in raven/cli/_theme.py reached by an earlier test in the same file and never restored.
I did not narrow it to the specific test that leaves it behind.
Why it is worth fixing rather than tolerating
A permanently-red suite trains everyone to read 1 failed as normal, which is exactly when a real regression stops being visible. It also costs every contributor the same investigation -- confirming on a clean base that the red is pre-existing before they can trust their own run.
Found while verifying #308; unrelated to it and present on a clean main.
- Dominant language
- Python
- Stars
- 4.1k
- Forks
- 94
- Avg merge
- 14h 44m
- Merged PRs (30d)
- 420
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EverMind-AI/Raven
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
EverMind-AI/Raven#997 ·
Maintainers usually reply within 1 day
-
fix(providers): the Codex model list is fetched as client 0.0.0 and hides the newest modelsPossibly taken @LivXue claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
EverMind-AI/Raven#986 ·
Maintainers usually reply within 1 day
-
fix: two error hints tell users to install raven by name, which is Sentry's client on PyPIPossibly taken @TheIrvin claimed this 14 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EverMind-AI/Raven#845 · 2 comments ·
Maintainers usually reply within 1 day
-
security: tool output scrubbing misses raven's own oauth token filesPossibly taken @akushonkamen claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
EverMind-AI/Raven#842 · 2 comments ·
Maintainers usually reply within 1 day
-
WeChat send silently succeeds when iLink returns non-zero ret with errcode=0Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EverMind-AI/Raven#210 · 2 comments ·
Maintainers usually reply within 1 day
All issues in EverMind-AI/Raven
Similar issues
-
Examples say cnxOpendocumentation embedded
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Alishahryar1/free-claude-code#2111 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
namespace operations
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
EclipseFdn/open-vsx.org#14373 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day