Skip to content

Commit d31c9ec

Browse files
committed
Keep inline-snapshot disabled when pytest runs in a terminal
`default-flags = ["disable"]` only covers runs whose stdout is not a terminal. In a terminal outside CI the plugin fell back to its own `default-flags-tui` default (`create`, `review`), stayed active, and the locked version raised `AttributeError: ... has no attribute '_meta'` on every `snapshot(...)` literal that spells the field as `_meta=`. Set `default-flags-tui` to `disable` as well, so a plain `pytest` run behaves the same in a terminal, in a pipe and in CI. Snapshots are still updated with an explicit `--inline-snapshot=create` or `fix`. Fixes #3544
1 parent c15566c commit d31c9ec

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,5 @@ source = [
333333

334334
[tool.inline-snapshot]
335335
default-flags = ["disable"]
336+
default-flags-tui = ["disable"]
336337
format-command = "ruff format --stdin-filename {filename}"

0 commit comments

Comments
 (0)