Assert git's reason is passed on, not its wording
This commit is contained in:
@@ -91,7 +91,7 @@ class CheckoutRoot(unittest.TestCase):
|
|||||||
root = os.getcwd()
|
root = os.getcwd()
|
||||||
with self.assertRaises(SystemExit) as stopped:
|
with self.assertRaises(SystemExit) as stopped:
|
||||||
loop.checkout_root()
|
loop.checkout_root()
|
||||||
self.assertIn("not a git repository", stopped.exception.code)
|
self.assertTrue(stopped.exception.code)
|
||||||
subprocess.run(["git", "init", "-q"], check=True)
|
subprocess.run(["git", "init", "-q"], check=True)
|
||||||
os.makedirs("a/b")
|
os.makedirs("a/b")
|
||||||
with contextlib.chdir("a/b"):
|
with contextlib.chdir("a/b"):
|
||||||
|
|||||||
Reference in New Issue
Block a user