Skip to content

Commit 93f7097

Browse files
gpib-ctypes added in toml
1 parent d8bd498 commit 93f7097

3 files changed

Lines changed: 1062 additions & 1060 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ dependencies = [
2929
"matplotlib",
3030
"pandas",
3131
"pymeasure",
32-
"Pillow",
33-
# "gpib-ctypes"
32+
"Pillow", # For image handling in GUIs
33+
"gpib-ctypes" # Provides a mockable GPIB backend for CI/testing
3434
]
3535

3636
[project.urls]

tests/test_gui_iv_k2400.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ def test_start_measurement_logic(self, MockFigure, MockBackend):
3131
"""
3232
# --- Setup ---
3333
# Instantiate the GUI. This also creates all the tk widgets.
34-
# --- FIX: Configure the mock for Figure.subplots ---
34+
# Configure the mock for Figure.subplots to return two mock axes
3535
mock_figure_instance = MockFigure.return_value
3636
mock_ax_vi = MagicMock()
3737
mock_ax_ri = MagicMock()
38-
mock_figure_instance.subplots.return_value = (mock_ax_vi, mock_ax_ri)
38+
# The GUI script calls subplots(), which needs to return our two mock axes
39+
mock_figure_instance.subplots.return_value = mock_ax_vi, mock_ax_ri
3940
app = MeasurementAppGUI(self.root)
4041

4142
# Mock the backend instance that the GUI will create

0 commit comments

Comments
 (0)