-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from RSS3-Network/fix/debug-transfer-widget
Fix: modify transfer widget and write automated test script
- Loading branch information
Showing
13 changed files
with
6,180 additions
and
5,241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import unittest | ||
|
||
|
||
class BaseAgentTest(unittest.TestCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
pass | ||
|
||
def setUp(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import sys | ||
import unittest | ||
|
||
from openagent.conf.llm_provider import set_current_llm | ||
|
||
|
||
def run_tests(model_name, specific_test=None): | ||
# Set the model name globally | ||
set_current_llm(model_name) | ||
|
||
# Discover and run all tests | ||
test_loader = unittest.TestLoader() | ||
|
||
if specific_test: | ||
specific_test = specific_test.replace("tests.", "", 1) | ||
test_suite = test_loader.loadTestsFromName(specific_test) | ||
else: | ||
test_suite = test_loader.discover("agent_trajectory", pattern="*.py") | ||
|
||
runner = unittest.TextTestRunner(verbosity=2) | ||
result = runner.run(test_suite) | ||
|
||
return result | ||
|
||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) < 2: | ||
print("Usage: python run_tests.py <model_name> OR python run_tests.py <model_name> [specific_test] ") | ||
sys.exit(1) | ||
|
||
model_name = sys.argv[1] | ||
specific_test = sys.argv[2] if len(sys.argv) > 2 else None | ||
|
||
result = run_tests(model_name, specific_test) | ||
|
||
if result.wasSuccessful(): | ||
sys.exit(0) | ||
else: | ||
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.