File size: 359 Bytes
f2dd44e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Test gradio_cmat."""
from gradio_cmat import gradio_cmat


def test_gradio_cmat():
    """Test gradio_cmat."""
    list1 = ["test", "测试", "love"]
    list2 = ["this is a test"]
    cmat = gradio_cmat(list1, list2)
    assert cmat.shape == (3, 1)

    assert cmat[0, 0] > 0.6
    assert cmat[1, 0] > 0.6
    assert cmat[2, 0] < 0.2

    # cmat.round(2)