diff options
Diffstat (limited to 'tests/unit/__init__.py')
| -rw-r--r-- | tests/unit/__init__.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index e43c93f1c..0f13c536d 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,8 +1,10 @@ # SPDX-License-Identifier: AGPL-3.0-or-later -# pylint: disable=missing-module-docstring +# pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name import os -from os.path import dirname, sep, abspath +from pathlib import Path -# In unit tests the user settings from unit/settings/test_settings.yml are used. -os.environ['SEARXNG_SETTINGS_PATH'] = abspath(dirname(__file__) + sep + 'settings' + sep + 'test_settings.yml') +# By default, in unit tests the user settings from +# unit/settings/test_settings.yml are used. + +os.environ['SEARXNG_SETTINGS_PATH'] = str(Path(__file__).parent / "settings" / "test_settings.yml") |