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
35 changes: 35 additions & 0 deletions tests/_test_msui/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
"""

tests._test_msui.conftest
~~~~~~~~~~~~~~~~~~~~~~~~~

common definitions for _test_msui

This file is part of MSS.

:copyright: Copyright 2016-2017 Reimar Bauer
:copyright: Copyright 2016-2026 by the MSS team, see AUTHORS.
:license: APACHE-2.0, see LICENSE for details.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import pytest
from mslib.utils.service_manager import WMSServiceManager


@pytest.fixture(autouse=True)
def _reset_wms_service_manager():
WMSServiceManager._shared_cache.clear()
yield
WMSServiceManager._shared_cache.clear()
5 changes: 0 additions & 5 deletions tests/_test_msui/test_wms_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import eventlet
from PyQt5 import QtCore, QtTest
from mslib.msui import flighttrack as ft
from mslib.utils.service_manager import WMSServiceManager
import mslib.msui.wms_control as wc


Expand All @@ -57,8 +56,6 @@ def _with_mswms_server(self, mswms_server):
self.scheme, self.host, self.port = parsed_url.scheme, parsed_url.hostname, parsed_url.port

def _setup(self, widget_type, tmp_path):
self.service_manager = WMSServiceManager()
self.service_manager.clear_cache()
if widget_type == "hsec":
self.view = HSecViewMockup()
else:
Expand Down Expand Up @@ -500,8 +497,6 @@ class TestWMSControlWidgetSetupSimple:

@pytest.fixture(autouse=True)
def setup(self, tmp_path, qtbot):
self.service_manager = WMSServiceManager()
self.service_manager.clear_cache()
self.view = HSecViewMockup()
self.tempdir = tmp_path
self.window = wc.HSecWMSControlWidget(view=self.view, wms_cache=self.tempdir)
Expand Down