Print the OS error's text once, the way read_premises does
This commit is contained in:
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user