Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mslib/support/qt_json_view/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ def actions(self, index):
class FilepathType(DataType):
"""Files and paths can be opened."""

REGEX = re.compile(r'(\/.*)|([A-Z]:\\.*)')
# REGEX = re.compile(r'(\/.*)|([A-Z]:\\.*)')
# (mss)
REGEX = re.compile(r'(~\/.*)|(\/.*)|([A-Z]:\\.*)')

Copy link
Member Author

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

def matches(self, data):
# (mss)
Expand Down
3 changes: 2 additions & 1 deletion tests/_test_msui/test_msui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The 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}"
Expand Down
3 changes: 3 additions & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Copy link
Member Author

@ReimarBauer ReimarBauer Jan 19, 2026

Choose a reason for hiding this comment

The 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)})


Expand Down
Loading