From 975af8af58a15d10b35ba335150dc586e87fd936 Mon Sep 17 00:00:00 2001 From: Cuong Nguyen Date: Tue, 18 Apr 2023 20:19:53 -0700 Subject: [PATCH] Rebase Signed-off-by: Cuong Nguyen --- release/ray_release/tests/test_bisect.py | 25 ++---------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/release/ray_release/tests/test_bisect.py b/release/ray_release/tests/test_bisect.py index 1a7fe46ec8bc..b4c566b07542 100644 --- a/release/ray_release/tests/test_bisect.py +++ b/release/ray_release/tests/test_bisect.py @@ -20,29 +20,8 @@ def test_bisect(): for output, input in test_cases.items(): - def _mock_run_test(test_name: str, commit: str) -> bool: - return input[commit] - - with mock.patch( - "ray_release.scripts.ray_bisect._run_test", - side_effect=_mock_run_test, - ), mock.patch( - "ray_release.scripts.ray_bisect._get_test", - return_value={}, - ): - assert _bisect("test", list(input.keys())) == output - -def test_bisect(): - commit_to_test_result = { - 'c0': True, - 'c1': True, - 'c2': True, - 'c3': False, - 'c4': False, - } - - def _mock_run_test(test_name: str, commit: str) -> bool: - return commit_to_test_result[commit] + def _mock_run_test(test: Test, commit: List[str]) -> Dict[str, str]: + return input with mock.patch( "ray_release.scripts.ray_bisect._run_test",