"""
Test for the lint processor.
This file tests the lint processor functionality.
"""
import pytest
from quack.processors.test_processor import TestProcessor
example_code = """
def add(a, b):
return a + b
def test_add():
assert add(1, 2) == 3, "Should return 3"
"""
@pytest.mark.asyncio
async def test_processor_pass():
processor = TestProcessor()
job = {"filename": "test_add.py", "code": example_code}
result = await processor.process(job)
assert result["result"]["status"] == "success", "Processor should return success"
assert result["result"]["passed"] == 1, "One test should pass"
assert result["result"]["failed"] == 0, "No test should fail"
assert "PASSED" in result["result"]["output"], "Output should show PASSED"