spyder 5.4.4+ds-1 autopkgtest fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
spyderlib |
New
|
Unknown
|
|||
spyder (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The autopkgtest for spyder 5.4.4+ds-1 fails:
```
=======
_______
def test_get_
"""Test get_user_
# All platforms should have a path environment variable, but
# Windows may have mixed case.
keys = {k.lower() for k in get_user_
> assert "path" in keys
E AssertionError: assert 'path' in {'_', 'debuginfod_urls', 'home', 'lc_ctype', 'pwd', 'shlvl'}
spyder/
_______
environ_dialog = <spyder.
qtbot = <pytestqt.
def test_environ(
"""Test the environment variables dialog."""
assert environ_dialog
# All platforms should have a path environment variable, but
# Windows may have mixed case.
keys = {k.lower() for k in environ_
> assert "path" in keys
E AssertionError: assert 'path' in {'_', 'debuginfod_urls', 'home', 'lc_ctype', 'pwd', 'shlvl'}
spyder/
=======
```
Running `env` before the test is executed in the autopkgtest shows that `PATH` is set:
```
PATH=/usr/
```
But running something similar to the spyder code does not contain the PATH variable:
```
$ env -i bash -l -c env | sort
DEBUGINFOD_URLS=https:/
PWD=/tmp/
SHLVL=0
_=/bin/env
```
The current upstream master approach seems to work (tested in schroot):
``` os.environ) )'" local/bin: /usr/bin: /bin
$ cat user-env.sh
#!/bin/bash -i
unset HISTFILE
#/bin/bash -l -c "/usr/bin/python3 -c 'import os; print(dict(
/bin/bash -l -c env | grep PATH
$ ./user-env.sh
PATH=/usr/
```