-
Notifications
You must be signed in to change notification settings - Fork 123
using the mss_dir in tests with verification #2983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,8 +51,9 @@ def test_main(): | |
|
|
||
|
|
||
| def test_keep_config_file(qtbot): | ||
| # in conftest we set always the mss_dir in the config file | ||
| # in fixtures we set the mss_dir in the config file | ||
| mss_dir = config_loader(dataset="mss_dir") | ||
| assert "~" not in mss_dir | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. safety check, that the value was changed |
||
| _config = MSUI_CONFIG_FILE_PATH.read_text() | ||
| assert _config == f'''{{ | ||
| "mss_dir": "{mss_dir}" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,8 @@ | |
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| """ | ||
| import os | ||
|
|
||
| import pytest | ||
| import mock | ||
| import multiprocessing | ||
|
|
@@ -72,6 +74,7 @@ def close_remaining_widgets(): | |
|
|
||
| @pytest.fixture | ||
| def msui_configs(tmp_path): | ||
| os.environ['MSUI_SETTINGS'] = os.path.join(tmp_path, "msui_settings.json") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. msui imports from here https://github.com/Open-MSS/MSS/blob/develop/mslib/msui/constants.py#L43 The environment variable adds (un?)necessary complexity and could be overlooked. |
||
| modify_config_file({"mss_dir": str(tmp_path)}) | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without this change the used value gets ignored and the default is then used