Assert git's reason is passed on, not its wording

This commit is contained in:
2026-09-25 08:46:40 +02:00
parent 4e1efc78ee
commit 41aff3b568
+1 -1
View File
@@ -91,7 +91,7 @@ class CheckoutRoot(unittest.TestCase):
root = os.getcwd()
with self.assertRaises(SystemExit) as stopped:
loop.checkout_root()
self.assertIn("not a git repository", stopped.exception.code)
self.assertTrue(stopped.exception.code)
subprocess.run(["git", "init", "-q"], check=True)
os.makedirs("a/b")
with contextlib.chdir("a/b"):