summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2018-12-10 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2018-12-10 21:21:49 +0100
commit6ef3d0209dd6e78c1247c1dded0948e0cadf2ffb (patch)
tree14a6e95179461b460258abed1cc36fb1c2ed4246 /tests
parent0d64a3482cb9b28b61bd724ec8288d222cfaa2d7 (diff)
downloaddconf-6ef3d0209dd6e78c1247c1dded0948e0cadf2ffb.tar.gz
tests: Sanitize additional environment variables used by dconf
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-dconf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-dconf.py b/tests/test-dconf.py
index b5b511d..88f6769 100755
--- a/tests/test-dconf.py
+++ b/tests/test-dconf.py
@@ -749,8 +749,12 @@ if __name__ == '__main__':
mandatory_profile = '/run/dconf/user/{}'.format(os.getuid())
assert not os.path.isfile(mandatory_profile)
- # Avoid profile sourced from environment
+ # Avoid profile sourced from environment or system data dirs.
os.environ.pop('DCONF_PROFILE', None)
+ os.environ.pop('XDG_DATA_DIRS', None)
+ # Avoid interfering with external message buses.
+ os.environ.pop('DBUS_SYSTEM_BUS_ADDRESS', None)
+ os.environ.pop('DBUS_SESSION_BUS_ADDRESS', None)
if len(sys.argv) < 3:
message = 'Usage: {} path-to-dconf path-to-dconf-service'.format(