Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Cuong Nguyen <[email protected]>
  • Loading branch information
can-anyscale committed Apr 19, 2023
1 parent e6ea463 commit 975af8a
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions release/ray_release/tests/test_bisect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 975af8a

Please sign in to comment.