Skip to content

Commit 63186f0

Browse files
Copilotjaraco
andcommitted
Fix test_help_in_readme: disable ANSI color via NO_COLOR env var
Co-authored-by: jaraco <308610+jaraco@users.noreply.github.com>
1 parent 055ba56 commit 63186f0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import itertools
2+
import os
23
import pathlib
34
import shlex
45
import subprocess
@@ -158,6 +159,7 @@ def test_help():
158159

159160
@pytest.mark.xfail("sys.version_info < (3, 13)")
160161
def test_help_in_readme():
161-
out = subprocess.check_output(['csv2ofx', '--help'], text=True)
162+
env = {**os.environ, "NO_COLOR": "1"}
163+
out = subprocess.check_output(['csv2ofx', '--help'], text=True, env=env)
162164
readme = pathlib.Path('README.md').read_text()
163165
assert out in readme, "README help is stale, please update."

0 commit comments

Comments
 (0)