mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
refactor: repo reorganization
This commit is contained in:
@ -5,7 +5,7 @@ from bec_lib.messages import ScanMessage
|
||||
from bec_lib.connector import MessageObject
|
||||
|
||||
# TODO: find a better way to mock singletons
|
||||
from bec_widgets.bec_dispatcher import _BECDispatcher
|
||||
from bec_widgets.utils.bec_dispatcher import _BECDispatcher
|
||||
|
||||
msg = MessageObject(topic="", value=ScanMessage(point_id=0, scanID=0, data={}).dumps())
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
import pyqtgraph as pg
|
||||
from pytestqt import qtbot
|
||||
|
||||
from bec_widgets import config_plotter
|
||||
|
||||
|
||||
def test_config_plotter(qtbot):
|
||||
"""Test ConfigPlotter"""
|
||||
|
||||
config = [
|
||||
{
|
||||
"cols": 1,
|
||||
"rows": 1,
|
||||
"y": 0,
|
||||
"x": 0,
|
||||
"config": {"channels": ["a"], "label_xy": ["", "a"], "item": "PlotItem"},
|
||||
}
|
||||
]
|
||||
plotter = config_plotter.ConfigPlotter(config)
|
||||
|
||||
assert isinstance(plotter.plots["a"]["item"], pg.PlotItem)
|
||||
|
||||
|
||||
def test_config_plotter_image(qtbot):
|
||||
"""Test ConfigPlotter"""
|
||||
|
||||
config = [
|
||||
{
|
||||
"cols": 1,
|
||||
"rows": 1,
|
||||
"y": 0,
|
||||
"x": 0,
|
||||
"config": {"channels": ["a"], "label_xy": ["", "a"], "item": "PlotItem"},
|
||||
},
|
||||
{
|
||||
"cols": 1,
|
||||
"rows": 1,
|
||||
"y": 1,
|
||||
"x": 0,
|
||||
"config": {"channels": ["b"], "label_xy": ["", "b"], "item": "ImageItem"},
|
||||
},
|
||||
]
|
||||
plotter = config_plotter.ConfigPlotter(config)
|
||||
|
||||
assert isinstance(plotter.plots["a"]["item"], pg.PlotItem)
|
@ -2,7 +2,7 @@ import numpy as np
|
||||
import pyqtgraph as pg
|
||||
from qtpy.QtCore import QPointF
|
||||
|
||||
from bec_widgets.qt_utils import Crosshair
|
||||
from bec_widgets.utils import Crosshair
|
||||
|
||||
|
||||
def test_mouse_moved_lines(qtbot):
|
||||
|
@ -7,7 +7,7 @@ import pytest
|
||||
from qtpy.QtWidgets import QLineEdit
|
||||
|
||||
from bec_widgets.widgets import ScanControl
|
||||
from bec_widgets.qt_utils.widget_io import WidgetIO
|
||||
from bec_widgets.utils.widget_io import WidgetIO
|
||||
|
||||
|
||||
# TODO there has to be a better way to mock messages than this, in this case I just took the msg from bec
|
||||
|
@ -1,6 +1,4 @@
|
||||
from pytestqt import qtbot
|
||||
|
||||
from bec_widgets import scan_plot
|
||||
from bec_widgets.widgets.scan_plot import scan_plot
|
||||
|
||||
|
||||
def test_scan_plot(qtbot):
|
||||
|
@ -8,7 +8,7 @@ from qtpy.QtWidgets import (
|
||||
QSpinBox,
|
||||
)
|
||||
|
||||
from bec_widgets.qt_utils.widget_io import WidgetHierarchy
|
||||
from bec_widgets.utils.widget_io import WidgetHierarchy
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
|
@ -5,7 +5,7 @@ import pytest
|
||||
import yaml
|
||||
from qtpy.QtWidgets import QWidget, QVBoxLayout, QPushButton
|
||||
|
||||
from bec_widgets.qt_utils.yaml_dialog import load_yaml, save_yaml
|
||||
from bec_widgets.utils.yaml_dialog import load_yaml, save_yaml
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
|
Reference in New Issue
Block a user