File size: 817 Bytes
b3ba863
 
 
 
235faca
b3ba863
 
 
 
 
235faca
b3ba863
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import streamlit.testing as stt

def test_recognize_face_optimal():
    with stt.install_test_input():
        stt.test_runner.start("app.py")

        # Select the "Recognize Face (Optimal)" option
        stt.test_input("Select Option", "Recognize Face (Optimal)")

        # Upload an image for optimal face recognition
        stt.test_input("Upload Image", "random.jpg")

        # Click the "Recognize Face (Optimal)" button
        stt.test_input("Recognize Face (Optimal)")

        # Verify the optimal recognition result
        stt.test_output("Best match: John Doe with a similarity score of 97.50%. Insta handle: <a href='https://www.instagram.com/johndoe123/' target='_blank'><font color='red'>johndoe123</font></a>")

        # Clean up
        stt.test_runner.cleanup()

test_recognize_face_optimal()