Skip to content

Commit ba828fe

Browse files
quant12345cclausspre-commit-ci[bot]tianyizheng02
authored
test_digital_image_processing -> test_local_binary_pattern replacing a large image with a smaller one (#10161)
* Replacing the generator with numpy vector operations from lu_decomposition. * Revert "Replacing the generator with numpy vector operations from lu_decomposition." This reverts commit ad217c6. * Replaced lena.jpg with lena_small.jpg to make tests faster. * Update digital_image_processing/test_digital_image_processing.py Co-authored-by: Christian Clauss <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test_digital_image_processing.py tests fail, I'll try an empty commit * Apply suggestions from code review * Update test_digital_image_processing.py added clarifications * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test_digital_image_processing.py --------- Co-authored-by: Christian Clauss <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tianyi Zheng <[email protected]>
1 parent c0da015 commit ba828fe

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Diff for: digital_image_processing/test_digital_image_processing.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,16 @@ def test_nearest_neighbour(
9696

9797

9898
def test_local_binary_pattern():
99-
file_path = "digital_image_processing/image_data/lena.jpg"
99+
# pull request 10161 before:
100+
# "digital_image_processing/image_data/lena.jpg"
101+
# after: "digital_image_processing/image_data/lena_small.jpg"
100102

101-
# Reading the image and converting it to grayscale.
103+
from os import getenv # Speed up our Continuous Integration tests
104+
105+
file_name = "lena_small.jpg" if getenv("CI") else "lena.jpg"
106+
file_path = f"digital_image_processing/image_data/{file_name}"
107+
108+
# Reading the image and converting it to grayscale
102109
image = imread(file_path, 0)
103110

104111
# Test for get_neighbors_pixel function() return not None

0 commit comments

Comments
 (0)