From f9aacd4087b02948da9a7878da48ea186ab99d5a Mon Sep 17 00:00:00 2001 From: Jason Chang Date: Thu, 3 Aug 2023 14:38:00 -0700 Subject: Raise repo exit errors in place of sys.exit Bug: b/293344017 Change-Id: I92d81c78eba8ff31b5252415f4c9a515a6c76411 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/381774 Tested-by: Jason Chang Reviewed-by: Joanna Wang Commit-Queue: Jason Chang --- tests/test_git_command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_git_command.py') diff --git a/tests/test_git_command.py b/tests/test_git_command.py index 1e8beabc..3dd31b29 100644 --- a/tests/test_git_command.py +++ b/tests/test_git_command.py @@ -204,12 +204,12 @@ class GitRequireTests(unittest.TestCase): def test_older_fatal(self): """Test fatal require calls with old versions.""" - with self.assertRaises(SystemExit) as e: + with self.assertRaises(git_command.GitRequireError) as e: git_command.git_require((2,), fail=True) self.assertNotEqual(0, e.code) def test_older_fatal_msg(self): """Test fatal require calls with old versions and message.""" - with self.assertRaises(SystemExit) as e: + with self.assertRaises(git_command.GitRequireError) as e: git_command.git_require((2,), fail=True, msg="so sad") self.assertNotEqual(0, e.code) -- cgit v1.2.3-54-g00ecf