Tests fail when XDG_CONFIG_HOME is present and not $HOME/.config
My XDG_CONFIG_HOME is $HOME/etc and the test checks for $HOME/.config . Unsetting it before running the testsuite works.
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-4.4.0, py-1.8.0, pluggy-0.9.0
rootdir: /home/impreza/usr/src/aports/community/osinfo-db-tools/src/osinfo-db-tools-1.5.0/tests
collected 5 items
test_osinfo_db_path.py ..F.. [100%]
=================================== FAILURES ===================================
___________________________ test_osinfo_db_path_user ___________________________
def test_osinfo_db_path_user():
"""
Test osinfo-db-path --user
"""
if "OSINFO_USER_DIR" in os.environ:
del os.environ["OSINFO_USER_DIR"]
cmd = [util.Tools.db_path, util.ToolsArgs.USER]
output = util.get_output(cmd)
expected_output = os.path.join(os.environ["HOME"], ".config",
"osinfo\n")
> assert output == expected_output
E AssertionError: assert '/home/impreza/etc/osinfo\n' == '/home/impreza/.config/osinfo\n'
E - /home/impreza/etc/osinfo
E ? ^^
E + /home/impreza/.config/osinfo
E ? ^ +++++
test_osinfo_db_path.py:51: AssertionError
====================== 1 failed, 4 passed in 0.42 seconds ======================
FAIL test_osinfo_db_path.py (exit status: 1)