Skip to content

Commit

Permalink
add unittest for save dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-x-c committed May 28, 2024
1 parent 20f4b4f commit 4603f07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/rpc_agent_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""
import unittest
import time
import os
import shutil
from loguru import logger

Expand Down Expand Up @@ -159,14 +160,15 @@ def setUp(self) -> None:
agentscope.init(
project="test",
name="rpc_agent",
save_dir="./test_runs",
save_dir="./.unittest_runs",
save_log=True,
)
self.assertTrue(os.path.exists("./.unittest_runs"))

def tearDown(self) -> None:
MonitorFactory._instance = None # pylint: disable=W0212
logger.remove()
shutil.rmtree("./test_runs")
shutil.rmtree("./.unittest_runs")

def test_single_rpc_agent_server(self) -> None:
"""test setup a single rpc agent"""
Expand Down

0 comments on commit 4603f07

Please sign in to comment.