]> granicus.if.org Git - graphviz/commitdiff
Unset the DISPLAY environment variable in gvedit usage test_1813
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 10 Sep 2020 16:47:01 +0000 (18:47 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 11 Sep 2020 05:37:29 +0000 (07:37 +0200)
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

index 8feb59cc8888d3f1ae02ad1fc9a731daf4298ca9..2fbc48b2e6b4aafec1b8e911a9a60b4934d22145 100644 (file)
@@ -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'