Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina committed Oct 21, 2024
1 parent a5b800b commit 83429ac
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ophyd_async.core import SignalR
from PIL import Image, ImageDraw

from dodal.devices.areadetector.plugins.MJPG_async import MJPG
from dodal.devices.areadetector.plugins.MJPG import MJPG


class SnapshotWithBeamCentre(MJPG):
Expand Down
2 changes: 1 addition & 1 deletion src/dodal/devices/oav/snapshots/snapshot_with_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ophyd_async.core import soft_signal_rw
from PIL.Image import Image

from dodal.devices.areadetector.plugins.MJPG_async import MJPG
from dodal.devices.areadetector.plugins.MJPG import MJPG
from dodal.devices.oav.snapshots.grid_overlay import (
add_grid_border_overlay_to_image,
add_grid_overlay_to_image,
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions tests/devices/unit_tests/oav/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ async def grid_snapshot() -> SnapshotWithGrid:
return grid_snapshot


@patch("dodal.devices.areadetector.plugins.MJPG_async.Image")
@patch("dodal.devices.areadetector.plugins.MJPG.Image")
@patch("dodal.devices.oav.snapshots.snapshot_with_beam_centre.ImageDraw")
@patch(
"dodal.devices.areadetector.plugins.MJPG_async.ClientSession.get",
"dodal.devices.areadetector.plugins.MJPG.ClientSession.get",
autospec=True,
)
async def test_snapshot_with_beam_centre_triggered_then_crosshair_drawn_and(
Expand All @@ -69,13 +69,13 @@ async def test_snapshot_with_beam_centre_triggered_then_crosshair_drawn_and(
mock_save.assert_awaited_once()


@patch("dodal.devices.areadetector.plugins.MJPG_async.Path.mkdir")
@patch("dodal.devices.areadetector.plugins.MJPG_async.Image")
@patch("dodal.devices.areadetector.plugins.MJPG.Path.mkdir")
@patch("dodal.devices.areadetector.plugins.MJPG.Image")
@patch(
"dodal.devices.areadetector.plugins.MJPG_async.ClientSession.get",
"dodal.devices.areadetector.plugins.MJPG.ClientSession.get",
autospec=True,
)
@patch("dodal.devices.areadetector.plugins.MJPG_async.aiofiles", autospec=True)
@patch("dodal.devices.areadetector.plugins.MJPG.aiofiles", autospec=True)
async def test_snapshot_with_beam_centre_correctly_triggered_and_saved(
mock_aiofiles, mock_get, patch_image, mock_mkdir, snapshot
):
Expand Down Expand Up @@ -106,13 +106,13 @@ def test_snapshot_draws_expected_crosshair(tmp_path: Path):
assert image_bytes == expected_bytes, "Actual and expected images differ"


@patch("dodal.devices.areadetector.plugins.MJPG_async.Image")
@patch("dodal.devices.areadetector.plugins.MJPG.Image")
@patch(
"dodal.devices.oav.snapshots.snapshot_with_grid.add_grid_border_overlay_to_image"
)
@patch("dodal.devices.oav.snapshots.snapshot_with_grid.add_grid_overlay_to_image")
@patch(
"dodal.devices.areadetector.plugins.MJPG_async.ClientSession.get",
"dodal.devices.areadetector.plugins.MJPG.ClientSession.get",
autospec=True,
)
async def test_snapshot_with_grid_triggered_saves_image_and_draws_grid(
Expand Down

0 comments on commit 83429ac

Please sign in to comment.