From 97adfe828dc3952c1bc3f2010c541b59eace1df4 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 3 Dec 2022 12:12:49 -0500 Subject: 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. --- doc/cmd.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') 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 -- cgit v1.2.1