Spaces:
Sleeping
Sleeping
import pytest | |
from app import predict_ai_text | |
def test_basic_ai_detection(): | |
# Simple test input | |
text = "This article explores the evolution of artificial intelligence in modern society." | |
result = predict_ai_text(text) | |
# Check it's a string and includes expected keywords | |
assert isinstance(result, str) | |
assert "Confidence" in result | |
assert any(label in result for label in ["AI-Generated", "Human-Written"]) | |
def test_empty_input(): | |
result = predict_ai_text("") | |
assert isinstance(result, str) | |
assert "Confidence" in result | |
def test_multiple_inputs(text): | |
result = predict_ai_text(text) | |
assert isinstance(result, str) | |
assert "Confidence" in result | |