File size: 494 Bytes
95110b5
 
 
 
3ece550
 
95110b5
d2df4a4
 
95110b5
d2df4a4
95110b5
d2df4a4
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

from app.handler import predict

def test_zero_shot_prediction_output():
    text = "Tu es complètement stupide"
    output = predict(text)

    print("Résultat brut :", output)

    # Vérifie que le format markdown est respecté
    assert "### Résultat de la classification" in output
    assert "**toxique**" in output
    assert "**non-toxique**" in output
    assert "%" in output