Spaces:
Runtime error
Runtime error
File size: 2,008 Bytes
4bdab37 |
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
import unittest
from unittest import TestCase
from chatarena.arena import Arena
import warnings
class TestCLI(TestCase):
def test_cli_1(self):
arena = Arena.from_config("examples/nlp-classroom.json")
arena.launch_cli(max_steps=10, interactive=False)
def test_cli_2(self):
# arena = Arena.from_config("examples/chameleon.json")
arena.launch_cli(max_steps=10, interactive=False)
def test_cli_3(self):
arena = Arena.from_config("examples/tic-tac-toe.json")
arena.launch_cli(max_steps=10, interactive=False)
def test_cli_4(self):
arena = Arena.from_config("examples/rock-paper-scissors.json")
arena.launch_cli(max_steps=10, interactive=False)
def test_cli_5(self):
arena = Arena.from_config("examples/nlp-classroom-3players.json")
arena.launch_cli(max_steps=10, interactive=False)
def test_cli_6(self):
arena = Arena.from_config("examples/pettingzoo_chess.json")
arena.launch_cli(max_steps=10, interactive=False)
def test_cli_7(self):
# Suppress ResourceWarning
warnings.filterwarnings(action="ignore", message="unclosed", category=ResourceWarning)
arena = Arena.from_config("examples/chatgpt_claude_ai_collaboration.json")
arena.launch_cli(max_steps=6, interactive=False)
def test_cli_8(self):
arena = Arena.from_config("examples/interview.json")
arena.launch_cli(max_steps=16, interactive=False)
def test_cli_9(self):
arena = Arena.from_config("examples/chatgpt_claude_ai_collaboration.json")
arena.launch_cli(max_steps=6, interactive=False)
def test_cli_10(self):
arena = Arena.from_config("examples/prisoners_dilemma.json")
arena.launch_cli(max_steps=3, interactive=False)
def test_cli_11(self):
arena = Arena.from_config("examples/pettingzoo_tictactoe.json")
arena.launch_cli(max_steps=9, interactive=False)
if __name__ == "__main__":
unittest.main()
|