Spaces:
Configuration error
Configuration error
Danila-Pechenev
commited on
Commit
·
7af3c8b
1
Parent(s):
2bbe009
Cosmetics
Browse files- test/test_model.py +4 -3
test/test_model.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from PIL import Image
|
2 |
from tensorflow import keras
|
3 |
import io
|
|
|
4 |
from ..app import model
|
5 |
|
6 |
model_instance: keras.Model = model.create_model()
|
@@ -21,7 +22,7 @@ def test_image_jpg():
|
|
21 |
width: int
|
22 |
height: int
|
23 |
output_image: Image.Image
|
24 |
-
width, height, output_image = template("test_images/test1.jpg")
|
25 |
|
26 |
assert width == output_image.size[0]
|
27 |
assert height == output_image.size[1]
|
@@ -31,7 +32,7 @@ def test_image_png():
|
|
31 |
width: int
|
32 |
height: int
|
33 |
output_image: Image.Image
|
34 |
-
width, height, output_image = template("test_images/test2.png")
|
35 |
|
36 |
assert width == output_image.size[0]
|
37 |
assert height == output_image.size[1]
|
@@ -41,7 +42,7 @@ def test_image_jpeg():
|
|
41 |
width: int
|
42 |
height: int
|
43 |
output_image: Image.Image
|
44 |
-
width, height, output_image = template("test_images/test3.jpeg")
|
45 |
|
46 |
assert width == output_image.size[0]
|
47 |
assert height == output_image.size[1]
|
|
|
1 |
from PIL import Image
|
2 |
from tensorflow import keras
|
3 |
import io
|
4 |
+
import os
|
5 |
from ..app import model
|
6 |
|
7 |
model_instance: keras.Model = model.create_model()
|
|
|
22 |
width: int
|
23 |
height: int
|
24 |
output_image: Image.Image
|
25 |
+
width, height, output_image = template(os.path.join(os.getcwd(), "test_images/test1.jpg"))
|
26 |
|
27 |
assert width == output_image.size[0]
|
28 |
assert height == output_image.size[1]
|
|
|
32 |
width: int
|
33 |
height: int
|
34 |
output_image: Image.Image
|
35 |
+
width, height, output_image = template(os.path.join(os.getcwd(), "test_images/test2.png"))
|
36 |
|
37 |
assert width == output_image.size[0]
|
38 |
assert height == output_image.size[1]
|
|
|
42 |
width: int
|
43 |
height: int
|
44 |
output_image: Image.Image
|
45 |
+
width, height, output_image = template(os.path.join(os.getcwd(), "test_images/test3.jpeg"))
|
46 |
|
47 |
assert width == output_image.size[0]
|
48 |
assert height == output_image.size[1]
|