Print the OS error's text once, the way read_premises does

This commit is contained in:
2026-09-25 17:27:09 +02:00
parent 40f0b73a19
commit 159cecaa1f
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -206,8 +206,7 @@ class Trust(unittest.TestCase):
config = pathlib.Path(home, ".claude.json")
with contextlib.redirect_stderr(io.StringIO()) as err:
loop.trust(["/a"])
self.assertIn(f"could not read {config}: ", err.getvalue())
self.assertIn("No such file or directory", err.getvalue())
self.assertEqual(err.getvalue(), f"could not read {config}: No such file or directory\n")
config.write_text("{")
with contextlib.redirect_stderr(io.StringIO()) as err:
loop.trust(["/a"])