From 45872afcb24c818f8036ea5ef20e7d2667b7fd2e Mon Sep 17 00:00:00 2001 From: rclary Date: Sat, 29 May 2021 11:11:37 -0700 Subject: [PATCH] * Linux system requires XAUTHORITY environment variable. Fixes test_pdb_eventloop. --- spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py | 4 ++-- spyder/utils/programs.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py b/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py index 52b62a5024b..6dc972089b7 100644 --- a/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py +++ b/spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py @@ -1760,9 +1760,9 @@ def test_pdb_eventloop(ipyconsole, qtbot, backend): """Check if pdb works with every backend. (only testing 3).""" # Skip failing tests if backend == 'tk' and (os.name == 'nt' or PY2): - return + pytest.skip() if backend == 'osx' and (sys.platform != "darwin" or PY2): - return + pytest.skip() shell = ipyconsole.get_current_shellwidget() qtbot.waitUntil(lambda: shell._prompt_html is not None, diff --git a/spyder/utils/programs.py b/spyder/utils/programs.py index 80f7b4397db..fe6342b8593 100644 --- a/spyder/utils/programs.py +++ b/spyder/utils/programs.py @@ -45,7 +45,7 @@ if os.name == 'nt': REQ_ENV_VARS.extend(['PATH', 'SYSTEMROOT', 'SYSTEMDRIVE', 'USERPROFILE']) elif sys.platform.startswith('linux'): - REQ_ENV_VARS.extend(['HOME', 'DISPLAY']) + REQ_ENV_VARS.extend(['HOME', 'DISPLAY', 'XAUTHORITY']) elif sys.platform == 'darwin': REQ_ENV_VARS.extend(['HOME'])