File size: 537 Bytes
717c92d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
from imgshape.shape import get_shape

def test_get_shape():
    img_path = "assets/sample_images/image_created_with_a_mobile_phone.png"
    if not os.path.exists(img_path):
        print("❌ test.jpg not found in assets/sample_images/")
        return

    shape = get_shape(img_path)
    assert isinstance(shape, tuple)
    assert len(shape) == 3
    assert all(isinstance(x, int) for x in shape)
    print(f"✅ Shape Test Passed: {shape}")

# Run test when executed directly
if __name__ == "__main__":
    test_get_shape()