The config dict is passed alongside the class that the fixture will eventually initialize. It can use the config dict for optional arguments to the implementation's constructor.
Improve coverage of current handling of `--basetemp` option and its lack of retention functionality.
Also document `PYTEST_DEBUG_TEMPROOT`.
Related to #10829
---------
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
Update the description for the `cache_dir` configuration options section to improve semantics and clarity for an unclear sentence in the file `reference.rst`.
This allows plugins loaded via '-p' to benefit from the new PYTHONPATH, making the option useful in more cases and less surprising.
For this to work it was required for the functionality to be part of Config rather than a separate plugin, which is unfortunate but in the end considered a small price to pay.
Fix#11118.
---------
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
Previously the docs contained an example for `tmp_path_retention_policy`
which included quotes around the value. If the configuration was
actually set with this value. The following error would be encountered
`INTERNALERROR> ValueError: tmp_path_retention_policy must be either all, failed, none. Current input: "all".`
This is because the value of the field was not being unwrapped from
the quotes when parsed.
This commit removes the quotes from the example so that if used in the
configuration file, no error will occur.
* furo theme for docs site
* removing duplicate tocs from deprecations and reference pages
* removing pallets references in code and config
* reverting trainings to sidebar
* removed sphinx style and unpinned packaging version
* updated styles
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us.
Fix#12112
---------
Co-authored-by: Ran Benita <ran@unusedvar.com>
Allow for the output of test case execution to be controlled independently from the application verbosity level.
`verbosity_test_case` is the new ini setting to adjust this functionality.
Fix#11639
* 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).