Spaces:
Runtime error
Runtime error
File size: 802 Bytes
b78ad07 c471598 b78ad07 c471598 b78ad07 c471598 b78ad07 c471598 b78ad07 c471598 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
"""Test convbot."""
# import asyncio
import pytest
from convbot import __version__
from convbot import convbot, aconvbot
pytestmark = pytest.mark.asyncio
def test_version():
"""Test version."""
assert __version__ == "0.1.0"
def test_sanity():
"""Sanity check."""
try:
assert not convbot("")
except Exception:
assert True
def test_convbot():
"""Test convbot."""
resp = convbot("How are you?")
assert len(resp) > 3
# 2nd call uses chat_history_ids
resp = convbot("How old are you?")
assert len(resp) > 3
async def tests_aconvbot():
"""Test aconvbot."""
resp = await aconvbot("How are you?")
assert len(resp) > 3
# 2nd call uses chat_history_ids
resp = await aconvbot("How old are you?")
assert len(resp) > 3
|