继续优化代码
This commit is contained in:
@@ -76,10 +76,10 @@ class TestConfigBootstrap(unittest.TestCase):
|
||||
with open(path, "w", encoding="utf-8") as f:
|
||||
f.write("# empty user\n")
|
||||
config.reset_cache()
|
||||
self.assertEqual(
|
||||
config.get("OPENCLAW_TEST_TARGET", "simulator_rpa"),
|
||||
config.get("OPENCLAW_TEST_TARGET") or "simulator_rpa",
|
||||
)
|
||||
with open(example, encoding="utf-8") as f:
|
||||
example_text = f.read()
|
||||
self.assertIn("OPENCLAW_TEST_TARGET=simulator_rpa", example_text)
|
||||
self.assertEqual(config.get("OPENCLAW_TEST_TARGET"), "simulator_rpa")
|
||||
|
||||
def test_config_path_outputs_json(self) -> None:
|
||||
with IsolatedDataRoot(user_id="_cfg_path"):
|
||||
|
||||
Reference in New Issue
Block a user