diff options
| author | Fuwn <[email protected]> | 2025-09-17 19:42:52 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-17 19:42:52 -0700 |
| commit | d7ac07115384c4ab2b598ff84a5f231ffa149d88 (patch) | |
| tree | e31ee3c8201a28e888ec9da21dbea5fc913c5d59 | |
| parent | refactor(rules): Use post flair ID instead of string (diff) | |
| download | umabot-d7ac07115384c4ab2b598ff84a5f231ffa149d88.tar.xz umabot-d7ac07115384c4ab2b598ff84a5f231ffa149d88.zip | |
feat(test_moderator): Add result stepping feature
| -rwxr-xr-x | test_moderator.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/test_moderator.py b/test_moderator.py index 7f04e37..0725642 100755 --- a/test_moderator.py +++ b/test_moderator.py @@ -291,7 +291,7 @@ class TestIntelligentModerator(IntelligentModeratorBase): print(f"ERROR: {message}") -def print_results(results: List[Dict[str, Any]]) -> None: +def print_results(results: List[Dict[str, Any]], pause: bool = False) -> None: """Print test results in a formatted way.""" print("\n" + "="*80) print("TEST RESULTS") @@ -303,6 +303,8 @@ def print_results(results: List[Dict[str, Any]]) -> None: if not result["success"]: print(f"❌ ERROR: {result['error']}") + if pause and i < len(results): + input("\n⏸️ Press Enter to continue to next result...") continue print(f"Title: {result['title']}") @@ -340,6 +342,10 @@ def print_results(results: List[Dict[str, Any]]) -> None: print(f" Subject: Your roleplay post has been removed for low effort") print(f" Message: Your roleplay post has been removed because it was determined to be low effort content.") print(f" Reasoning: {evaluation['reasoning']}") + + # Add pause between results if requested + if pause and i < len(results): + input("\n⏸️ Press Enter to continue to next result...") def main(): @@ -361,6 +367,9 @@ Examples: # Test 5 random files from a directory python test_moderator.py --directory real_test_posts/ --random 5 + # Test with pause between results + python test_moderator.py --directory real_test_posts/ --random 3 --pause + # Download 20 roleplay posts from Reddit python test_moderator.py --download-roleplay 20 @@ -409,6 +418,12 @@ Examples: ) parser.add_argument( + "--pause", "-p", + action="store_true", + help="Pause between each evaluation result (press Enter to continue)" + ) + + parser.add_argument( "--download-roleplay", type=int, metavar="COUNT", @@ -489,7 +504,7 @@ Examples: results.extend(dir_results) # Print results - print_results(results) + print_results(results, pause=args.pause) # Summary total = len(results) |