From 8fb5a0cecc0bedfefc43f1f60629f4e4a4d5a7c1 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Thu, 10 Sep 2020 18:47:01 +0200 Subject: [PATCH] Unset the DISPLAY environment variable in gvedit usage test_1813 This ensures that the test fails instead of hanging if print usage and exit fails and the program continues and tries to open the display. --- rtest/test_regression.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtest/test_regression.py b/rtest/test_regression.py index 8feb59cc8..2fbc48b2e 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -323,7 +323,10 @@ def test_1813(): https://gitlab.com/graphviz/graphviz/-/issues/1813 ''' + environ_copy = os.environ.copy() + environ_copy.pop('DISPLAY', None) output = subprocess.check_output(['gvedit', '-?'], + env=environ_copy, universal_newlines=True) assert 'Usage' in output, 'gvedit -? did not show usage' -- 2.40.0