Test a sign-in status that is JSON but no object, and one whose loggedIn is no boolean
CI / tests (pull_request) Failing after 4m32s

This commit is contained in:
2026-12-04 03:09:13 +01:00
parent c81967d4d6
commit 5083d345f2
+1 -1
View File
@@ -128,7 +128,7 @@ class Home(unittest.TestCase):
self.assertEqual(self.unready(), f"nobody is signed in to the loop's Claude home; run `CLAUDE_CONFIG_DIR={self.home} claude` and type /login there, once")
def test_a_status_that_says_nobody_is_signed_in_or_out_quotes_what_claude_said(self) -> None:
for stdout, stderr, said in (("", "Error: the settings\nare broken\n", "Error: the settings are broken"), ("Not logged in\n", "", "Not logged in"), ('{"authMethod": "none"}', "", '{"authMethod": "none"}'), ("", "", "it printed nothing and exited 1")):
for stdout, stderr, said in (("", "Error: the settings\nare broken\n", "Error: the settings are broken"), ("Not logged in\n", "", "Not logged in"), ('{"authMethod": "none"}', "", '{"authMethod": "none"}'), ("3", "", "3"), ('{"loggedIn": "yes"}', "", '{"loggedIn": "yes"}'), ("", "", "it printed nothing and exited 1")):
with self.subTest(said=said):
def claude(args: list[str]) -> subprocess.CompletedProcess[str]:
return subprocess.CompletedProcess(args, 1, stdout, stderr) if args == ["auth", "status"] else subprocess.CompletedProcess(args, 0, "", "")