Skip to content

Commit

Permalink
fix mocked return value
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
  • Loading branch information
justinvyu committed Dec 28, 2023
1 parent d4987e7 commit ec3c988
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xgboost_ray/tests/test_tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import shutil
import tempfile
import unittest
from unittest.mock import patch
from unittest.mock import patch, MagicMock

import numpy as np
import ray
Expand Down Expand Up @@ -140,7 +140,7 @@ def testReplaceTuneCheckpoints(self):
in_dict = {"callbacks": in_cp}

with patch("ray.train.get_context") as mocked:
mocked.return_value = True
mocked.return_value = MagicMock(return_value=True)
_try_add_tune_callback(in_dict)

replaced = in_dict["callbacks"][0]
Expand Down

0 comments on commit ec3c988

Please sign in to comment.