Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/t/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,8 @@ def diff_env(before: List[str], after: List[str], ignore: str):
if not re.search(r"^(---|\+\+\+|@@ )", x)
# Ignore variables expected to change:
and not re.search(
r"^[-+](_|PPID|BASH_REMATCH|(BASH_)?LINENO)=",
# _omp_*: https://ohmyposh.dev
r"^[-+](_|PPID|BASH_REMATCH|(BASH_)?LINENO|_omp_.+)=",
Copy link
Collaborator

@akinomyoga akinomyoga Jan 26, 2026

Choose a reason for hiding this comment

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

Also, to reduce the size of the output, I think environment variables are better to be filtered in _comp__test_get_env (test/config/bashrc):

unset -v $(compgen -W '"${!_comp_@}"' -X '!_comp_@(_test_+([0-9])_*|*_mut_*)')

_, PPID, BASH_REMATCH, BASH_LINENO, and LINENO are excluded in conftest.py because they are special variables that cannot be unset. Technically, BASH_REMATCH can be unset in recent versions of Bash, but it can't in Bash < 5.1.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Re the original question, TBH I did not research the "why" nor can I answer it offhand. It's just something I saw when doing a pytest test/t/unit/test_unit_compgen_filedir_xspec.py while having the branch related to that change checked out and oh-my-posh active, every time. I can't reproduce right now on main though, so drafting for now and will reopen if I see it again.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, I know that apparently strange things sometimes happen. There could be a specific setup that OMP affects the test sessions, though I don't have an idea for now.

x,
re.ASCII,
)
Expand Down