mirror of
https://github.com/sharkdp/bat.git
synced 2025-07-03 05:33:30 +01:00
Consolidate environment variable lists
We want to make sure that all of our test environments are clean from possible outside modification. This consolidates the list of used environment variables in Rust-based and Python-based integration tests. Note that there is also a similar list in `src/bin/bat/main.rs` which is even more exhaustive (for bug report collection). However, some of these variables can not possibly have an effect on test environments.
This commit is contained in:
tests
@ -47,12 +47,16 @@ def create_highlighted_versions(output_basepath):
|
||||
):
|
||||
try:
|
||||
env = os.environ.copy()
|
||||
env.pop("PAGER", None)
|
||||
env.pop("BAT_PAGER", None)
|
||||
env.pop("BAT_CACHE_PATH", None)
|
||||
env.pop("BAT_CONFIG_DIR", None)
|
||||
env.pop("BAT_CONFIG_PATH", None)
|
||||
env.pop("BAT_OPTS", None)
|
||||
env.pop("BAT_PAGER", None)
|
||||
env.pop("BAT_STYLE", None)
|
||||
env.pop("BAT_THEME", None)
|
||||
env.pop("BAT_TABS", None)
|
||||
env.pop("BAT_THEME", None)
|
||||
env.pop("NO_COLOR", None)
|
||||
env.pop("PAGER", None)
|
||||
env["COLORTERM"] = "truecolor" # make sure to output 24bit colors
|
||||
|
||||
source_dirname = path.basename(path.dirname(source))
|
||||
|
Reference in New Issue
Block a user