-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit tests for calculations and utils modules
- Loading branch information
Showing
5 changed files
with
12 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
from setuptools import setup, find_packages | ||
|
||
from setuptools import find_packages, setup | ||
|
||
setup( | ||
name="tasnif", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import os | ||
from tasnif.utils import read_images_from_directory, read_with_pil | ||
|
||
|
||
def test_read_images_from_directory(): | ||
# Assuming you have a directory named "test_images" with some image files | ||
images = read_images_from_directory("tests/test_images") | ||
assert len(images) > 0, "No images found in the directory." | ||
|
||
|
||
def test_read_with_pil(): | ||
# Use the same directory as above or make sure it contains at least one image | ||
image_paths = read_images_from_directory("tests/test_images") | ||
images = read_with_pil(image_paths) | ||
assert len(images) == len(image_paths), "Not all images were read successfully." |