From 68b13f3cfde0b68c5e58238248bf5618fbff2a6d Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 10 Jan 2024 10:14:05 -0500 Subject: [PATCH] FIX: Better --- mne/_fiff/open.py | 2 +- mne/commands/tests/test_commands.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mne/_fiff/open.py b/mne/_fiff/open.py index 16d69e280d4..02fcda445a0 100644 --- a/mne/_fiff/open.py +++ b/mne/_fiff/open.py @@ -353,7 +353,7 @@ def _show_tree( ) else: postpend += " ... type=" + str(type(tag.data)) - postpend = ">" * 20 + "BAD" if not good else postpend + postpend = ">" * 20 + f"BAD @{pos}" if not good else postpend matrix_info = _matrix_info(tag) if matrix_info is not None: _, type_, _, _ = matrix_info diff --git a/mne/commands/tests/test_commands.py b/mne/commands/tests/test_commands.py index ac7ffe60ac3..1d33fc17a62 100644 --- a/mne/commands/tests/test_commands.py +++ b/mne/commands/tests/test_commands.py @@ -114,7 +114,7 @@ def test_show_fiff(tmp_path): with pytest.warns(RuntimeWarning, match="Invalid tag"): lines = show_fiff(str(bad_fname), output=list) last_line = lines[-1] - assert ">>>>BAD" in last_line + assert last_line.endswith(">>>>BAD @9015") assert "302 = FIFF_EPOCH (734412b >f4)" in last_line