def test_get_bbox_no_bbox(): """ Test attempting to get a bbox when none is set. """ inst = MemoryDetectionElement(0) with pytest.raises(NoDetectionError, match="Missing detection bounding box for " "in-memory detection with UUID 0"): inst.get_bbox()
def test_get_bbox(): """ Test successfully getting the detection bounding box. """ bbox = mock.MagicMock(spec_set=AxisAlignedBoundingBox) inst = MemoryDetectionElement(0) inst._bbox = bbox assert inst.get_bbox() == bbox