summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2020-11-25 18:11:31 +0100
committerBenjamin Berg <bberg@redhat.com>2020-11-25 18:18:20 +0100
commit82356e0f9db9de306a1f2c2864755727c6383b96 (patch)
tree6cedb730c2b4f77002d7063ddda08687faf7d26d
parentd81b738e21c3d5a53feca62ee41baf0bc481df8e (diff)
downloadgnome-settings-daemon-benzea/test-display-env.tar.gz
tests: Unset display environment variablesbenzea/test-display-env
The environment variables were not correctly cleared. Fix this and also make sure that we don't have the GNOME_SETUP_DISPLAY environment variable leaking in from the outside.
-rw-r--r--tests/x11session.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/x11session.py b/tests/x11session.py
index ff2d389c..7fb0b834 100644
--- a/tests/x11session.py
+++ b/tests/x11session.py
@@ -94,7 +94,10 @@ class X11SessionTestCase(DBusTestCase):
klass.X_display = display
# Export information into our environment for tests to use
os.environ['DISPLAY'] = ":%d" % klass.X_display
- os.environ['WAYLAND'] = ''
+ if 'GNOME_SETUP_DISPLAY' in os.environ:
+ del os.environ['GNOME_SETUP_DISPLAY']
+ if 'WAYLAND_DISPLAY' in os.environ:
+ del os.environ['WAYLAND_DISPLAY']
# Server should still be up and running at this point
assert klass.xorg.poll() is None