From: Magnus Jacobsson Date: Thu, 10 Sep 2020 16:47:01 +0000 (+0200) Subject: Unset the DISPLAY environment variable in gvedit usage test_1813 X-Git-Tag: 2.46.0~20^2^2~88^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fb5a0cecc0bedfefc43f1f60629f4e4a4d5a7c1;p=graphviz 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. --- 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'