mirror of
https://github.com/ihabunek/toot
synced 2024-12-25 08:30:49 +01:00
beeb7914a8
According to the Python documentation[1]: > Calls to unsetenv() don’t update os.environ, so it is actually > preferable to delete items of os.environ. It means that os.unsetenv is not enough to remove an entry from os.environ. This is why the following test was failing: os.unsetenv('XDG_CONFIG_HOME') assert fn() == os.path.expanduser('~/.config/toot/config.json') os.unsetenv did not influence the output of the subsequent call to os.getenv() in get_config_file_path(). As a result the original value was returned instead of the fallback value of '~/.config'. This bug was discovered during porting toot to FreeBSD as the FreeBSD Ports framework passes XDG_CONFIG_HOME to make's environment. [1]: https://docs.python.org/3.6/library/os.html#os.unsetenv |
||
---|---|---|
.. | ||
__init__.py | ||
test_api.py | ||
test_auth.py | ||
test_config.py | ||
test_console.py | ||
test_version.py | ||
utils.py |