Skip to content

Commit aa46117

Browse files
authored
Update test_digital_image_processing.py
1 parent f3f0898 commit aa46117

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

digital_image_processing/test_digital_image_processing.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def test_gen_gaussian_kernel_filter():
6363
def test_convolve_filter():
6464
"""Test image convolution operation."""
6565
# Laplace kernel for edge detection
66-
laplace = array([[0.25, 0.5, 0.25], [0.5, -3, 0.5], [0.25, 0.5, 0.25]])
67-
result = conv.img_convolve(gray, laplace).astype(uint8)
66+
laplace = np.array([[0.25, 0.5, 0.25], [0.5, -3, 0.5], [0.25, 0.5, 0.25]])
67+
result = conv.img_convolve(gray, laplace).astype(np.uint8)
6868
assert result.any() # Verify convolution output
6969

7070

@@ -88,18 +88,14 @@ def test_sepia():
8888

8989
def test_burkes():
9090
"""Test Burkes dithering algorithm."""
91-
burkes = bs.Burkes(
92-
imread("digital_image_processing/image_data/lena_small.jpg", 1), 120
93-
)
91+
burkes = bs.Burkes(imread("digital_image_processing/image_data/lena_small.jpg", 1), 120)
9492
burkes.process()
9593
assert burkes.output_img.any()
9694

9795

9896
def test_nearest_neighbour():
9997
"""Test nearest-neighbor resizing."""
100-
nn = rs.NearestNeighbour(
101-
imread("digital_image_processing/image_data/lena_small.jpg", 1), 400, 200
102-
)
98+
nn = rs.NearestNeighbour(imread("digital_image_processing/image_data/lena_small.jpg", 1), 400, 200)
10399
nn.process()
104100
assert nn.output.any()
105101

0 commit comments

Comments
 (0)