summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-12-03 12:12:49 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-12-03 12:19:24 -0500
commit97adfe828dc3952c1bc3f2010c541b59eace1df4 (patch)
tree1175c6bb83bea597dee72031409d0fddae5ca863 /doc
parent75a789fad14770382448c24b479bc484a8c058b8 (diff)
downloadpython-coveragepy-git-97adfe828dc3952c1bc3f2010c541b59eace1df4.tar.gz
test: setting COLUMNS=80 broadly makes pytest too narrow
Better to set it precisely where it is needed. This also ensures that running cog from the Makefile will get the right results.
Diffstat (limited to 'doc')
-rw-r--r--doc/cmd.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/cmd.rst b/doc/cmd.rst
index 663ca708..c1f52ee7 100644
--- a/doc/cmd.rst
+++ b/doc/cmd.rst
@@ -6,6 +6,12 @@
Running "make prebuild" will bring it up to date.
.. [[[cog
+ # optparse wraps help to the COLUMNS value. Set it here to be sure it's
+ # consistent regardless of the environment. Has to be set before we
+ # import cmdline.py, which creates the optparse objects.
+ import os
+ os.environ["COLUMNS"] = "80"
+
import contextlib
import io
import re