Commit 77cc0d87 authored by Thibault Saunier's avatar Thibault Saunier Committed by Alexandru Băluț

tests_: Make sure not to save and use any config data from actual user space

Fixes T7677
Reviewed-by: Alexandru Băluț's avatarAlex Băluț <alexandru.balut@gmail.com>
Differential Revision: https://phabricator.freedesktop.org/D1595
parent 026aded5
......@@ -6,6 +6,7 @@ import glob
import os
import sys
import unittest
from tempfile import mkdtemp
def get_pitivi_dir():
......@@ -29,7 +30,11 @@ def _prepend_env_paths(**args):
def setup():
"""Sets paths and initializes modules, to be able to run the tests."""
res = True
# Make sure xdg_*_home return temp dirs, to avoid touching
# the config files of the developer.
os.environ['XDG_DATA_HOME'] = mkdtemp()
os.environ['XDG_CONFIG_HOME'] = mkdtemp()
os.environ['XDG_CACHE_HOME'] = mkdtemp()
# Make available to configure.py the top level dir.
pitivi_dir = get_pitivi_dir()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment