Also sanitize various XDG* env vars when running the test suite
This commit is contained in:
parent
7e84343f16
commit
66db3f9764
8
test.py
8
test.py
@ -33,7 +33,13 @@ def init_env() -> None:
|
|||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
warnings.simplefilter('error')
|
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()
|
init_env()
|
||||||
m = importlib.import_module('kitty_tests.main')
|
m = importlib.import_module('kitty_tests.main')
|
||||||
m.run_tests() # type: ignore
|
m.run_tests() # type: ignore
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user