mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Also sanitize various XDG* env vars when running the test suite
This commit is contained in:
parent
7e84343f16
commit
66db3f9764
1 changed files with 7 additions and 1 deletions
8
test.py
8
test.py
|
|
@ -33,7 +33,13 @@ def init_env() -> None:
|
|||
|
||||
def main() -> None:
|
||||
warnings.simplefilter('error')
|
||||
with TemporaryDirectory() as tdir, env_vars(PYTHONWARNINGS='error', HOME=tdir, USERPROFILE=tdir):
|
||||
with TemporaryDirectory() as tdir, env_vars(
|
||||
PYTHONWARNINGS='error', HOME=tdir, USERPROFILE=tdir,
|
||||
XDG_CONFIG_HOME=os.path.join(tdir, '.config'),
|
||||
XDG_CONFIG_DIRS=os.path.join(tdir, '.config'),
|
||||
XDG_DATA_DIRS=os.path.join(tdir, '.local', 'xdg'),
|
||||
XDG_CACHE_HOME=os.path.join(tdir, '.cache'),
|
||||
):
|
||||
init_env()
|
||||
m = importlib.import_module('kitty_tests.main')
|
||||
m.run_tests() # type: ignore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue