mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 00:40:45 +08:00
Append english_output_guard when lang=en, strengthen ops/generalist EN role prompts, pass NETX_TOOL_LANG into netx tools, and map Chinese protocol buckets to English. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
459 B
Python
17 lines
459 B
Python
import unittest
|
|
|
|
from runtime.english_output_guard import english_output_guard_for_lang
|
|
|
|
|
|
class EnglishOutputGuardTests(unittest.TestCase):
|
|
def test_en_returns_guard(self) -> None:
|
|
g = english_output_guard_for_lang("en")
|
|
self.assertIn("English-only", g)
|
|
self.assertIn("CJK", g)
|
|
|
|
def test_zh_empty(self) -> None:
|
|
self.assertEqual(english_output_guard_for_lang("zh"), "")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|