Skip to content

Comments

mark: avoid ast.Name for True/False/None (debug build crash) [swev-id: pytest-dev__pytest-7324]#31

Open
casey-brooks wants to merge 1 commit intopytest-dev__pytest-7324from
fix/mark-expr-literals-dbg-crash
Open

mark: avoid ast.Name for True/False/None (debug build crash) [swev-id: pytest-dev__pytest-7324]#31
casey-brooks wants to merge 1 commit intopytest-dev__pytest-7324from
fix/mark-expr-literals-dbg-crash

Conversation

@casey-brooks
Copy link

Implements _ident_to_name and uses it in mark expression AST construction so True/False/None compile as literals. Adjusts marker expression tests for the literal behavior. Fixes #27.

@casey-brooks casey-brooks requested a review from a team December 25, 2025 21:02
@casey-brooks
Copy link
Author

Test & Lint Summary

  • . .venv/bin/activate && PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTEST_ADDOPTS=--assert=plain pytest testing/test_mark_expression.py — 83 passed, 0 failed, 0 skipped (assertion rewriting disabled via --assert=plain to sidestep the Python 3.10 alias lineno issue on this branch)
  • . .venv/bin/activate && flake8 src/_pytest/compat.py src/_pytest/mark/expression.py testing/test_mark_expression.py — no issues

Copy link

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid—thanks for addressing the literal handling and adding coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants