test_ok2/doc/en
Michał Górny 52db918a27
Fix handling empty values of NO_COLOR and FORCE_COLOR (#11712)
* Fix handling empty values of NO_COLOR and FORCE_COLOR

Fix handling NO_COLOR and FORCE_COLOR environment variables to correctly
be ignored when they are set to an empty value, as defined
in the specification:

> Command-line software which adds ANSI color to its output by default
> should check for a NO_COLOR environment variable that, when present
> *and not an empty string* (regardless of its value), prevents
> the addition of ANSI color.

(emphasis mine, https://no-color.org/)

The same is true of FORCE_COLOR, https://force-color.org/.

* Streamline testing for FORCE_COLOR and NO_COLOR

Streamline the tests for FORCE_COLOR and NO_COLOR variables, and cover
all possible cases (unset, set to empty, set to "1").  Combine the two
assert functions into one taking boolean parameters.  Mock file.isatty
in all circumstances to ensure that the environment variables take
precedence over the fallback value resulting from isatty check (or that
the fallback is actually used, in the case of both FORCE_COLOR
and NO_COLOR being unset).
2023-12-23 10:12:13 +02:00
..
_templates Declutter doc entry page (#9969) 2022-05-24 10:23:39 +02:00
announce Merge pull request #11546 from pytest-dev/release-7.4.3 (#11549) 2023-10-24 16:50:13 -03:00
example doc/reference: document `FixtureLookupError` 2023-12-07 11:50:02 +02:00
explanation doc: fix some broken Sphinx references 2023-12-07 00:30:35 +02:00
how-to doc: fix some broken Sphinx references 2023-12-07 00:30:35 +02:00
img Use transparent PNG for logo (#8159) 2020-12-16 11:19:45 -03:00
proposals Replace hardcoded links to PyPI with extlinks (#9224) 2021-10-22 09:47:57 -03:00
reference Fix handling empty values of NO_COLOR and FORCE_COLOR (#11712) 2023-12-23 10:12:13 +02:00
Makefile fix #8818 - run regendoc without tox cachedir 2021-10-04 08:56:26 +02:00
adopt.rst Replace hardcoded links to Github issues with extlinks (#9234) 2021-11-06 11:16:11 +02:00
backwards-compatibility.rst doc: fix some broken Sphinx references 2023-12-07 00:30:35 +02:00
builtin.rst Merge pull request #11408 from pytest-dev/release-7.4.2 (#11409) 2023-09-07 16:10:19 -03:00
changelog.rst doc: fix more broken Sphinx references 2023-12-07 11:50:02 +02:00
conf.py doc: enable Sphinx nitpicky mode 2023-12-07 12:14:45 +02:00
conftest.py pre-commit run fix-encoding-pragma --all-files 2019-06-03 12:08:01 -03:00
contact.rst adding contact and badge for pytest-dev discord server (#9078) 2021-09-12 18:22:44 +01:00
contents.rst Remove docs on Python 2.7 and 3.4 Support (#9957) 2022-05-16 10:17:18 +02:00
contributing.rst Updated documentation from txt to rst 2015-08-04 16:41:02 +05:30
deprecations.rst doc: fix some broken Sphinx references 2023-12-07 00:30:35 +02:00
development_guide.rst adopt main terminology in the configs 2021-03-09 22:35:34 +01:00
funcarg_compare.rst doc: fix more broken Sphinx references 2023-12-07 11:50:02 +02:00
funcargs.rst fix line endings 2018-05-23 16:45:23 +02:00
getting-started.rst Merge pull request #11546 from pytest-dev/release-7.4.3 (#11549) 2023-10-24 16:50:13 -03:00
historical-notes.rst doc: fix some broken Sphinx references 2023-12-07 00:30:35 +02:00
history.rst Fix typos (#9424) 2021-12-27 09:23:15 -03:00
index.rst doc: Remove done training (#11399) 2023-09-06 15:22:27 +02:00
license.rst Change copyright notice so yearly updates are not needed 2021-11-30 09:28:23 -03:00
naming20.rst Updated documentation from txt to rst 2015-08-04 16:41:02 +05:30
pytest.ini
recwarn.rst Add docs for the warnings functionality 2017-03-20 23:35:01 -03:00
requirements.txt doc: allow Sphinx 6.x and 7.x (#11568) 2023-10-29 23:00:27 +01:00
sponsor.rst fix typos in docs 2019-12-19 10:35:15 +01:00
talks.rst Update training list 2022-06-10 15:40:53 +02:00
tidelift.rst Update Tidelift docs with latest campaign 2019-10-24 14:58:58 -03:00
yieldfixture.rst Remove all version references to obsolete pytest versions 2019-04-28 12:37:58 -03:00