Answer stability round 2: 0 🔴, 1 🟡 (0 misread); run two looped tests under subTest, refuse a blocker that is no issue key, and test the page cap, the four conversions at once and the search's failure messages

This commit is contained in:
2026-11-14 19:50:47 +01:00
parent 4e0e7e655d
commit 98c28cc244
5 changed files with 37 additions and 10 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ class ReadEnv(unittest.TestCase):
self.assertTrue(isinstance(failed, Failure) and failed.reason.startswith(f"cannot read {self.path}: "), failed)
def test_parses_quotes_comments_and_spaces(self):
self.assertEqual(parse_env("# note\nA = 1 \nB=\"two words\"\nC='3'\nnot a pair\n#D=4\nE=a=b\n"), {"A": "1", "B": "two words", "C": "3", "E": "a=b"})
self.assertEqual(parse_env("# note\nA = 1 \nB=\"two words\"\nC='3'\nnot a pair\n#D=4\nE=a=b\nF=\"\"\nG='\n"), {"A": "1", "B": "two words", "C": "3", "E": "a=b", "F": "", "G": "'"})
if __name__ == "__main__":
+3 -1
View File
@@ -109,7 +109,9 @@ class HttpJson(unittest.TestCase):
self.server.server_close()
failed = send("GET", f"{base}/api/v4/users/me", "t", None)
self.assertIsInstance(failed, Failure)
self.assertTrue(str(getattr(failed, "reason", "")).startswith(f"cannot reach {base}: "), failed)
reason = str(getattr(failed, "reason", ""))
self.assertTrue(reason.startswith(f"cannot reach {base}: "), failed)
self.assertNotIn("urlopen", reason)
def test_an_error_whose_body_is_not_json_names_the_status_alone(self):
base = self.serve((403, b"<html>"))