Skip to content

Commit

Permalink
fbcode//torchx/runner/test
Browse files Browse the repository at this point in the history
Differential Revision: D67847563
  • Loading branch information
CodemodService PythonDeprecatedAssertsBot authored and facebook-github-bot committed Jan 6, 2025
1 parent 5e44f20 commit 04ab5b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions torchx/runner/test/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def test_status_ui_url(self, json_dumps_mock: MagicMock, _) -> None:
)
app_handle = runner.run(AppDef(app_id, roles=[role]), scheduler="local_dir")
status = none_throws(runner.status(app_handle))
self.assertEquals(resp.ui_url, status.ui_url)
self.assertEqual(resp.ui_url, status.ui_url)

@patch("json.dumps")
def test_status_structured_msg(self, json_dumps_mock: MagicMock, _) -> None:
Expand All @@ -493,7 +493,7 @@ def test_status_structured_msg(self, json_dumps_mock: MagicMock, _) -> None:
)
app_handle = runner.run(AppDef(app_id, roles=[role]), scheduler="local_dir")
status = none_throws(runner.status(app_handle))
self.assertEquals(resp.structured_error_msg, status.structured_error_msg)
self.assertEqual(resp.structured_error_msg, status.structured_error_msg)

def test_wait_unknown_app(self, _) -> None:
with self.get_runner() as runner:
Expand Down
2 changes: 1 addition & 1 deletion torchx/runner/test/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def test_load_invalid_runopt(self, _) -> None:
# this makes things super hard to guarantee BC - stale config file will fail
# to run, we don't want that)

self.assertEquals("option_that_exists", cfg.get("s"))
self.assertEqual("option_that_exists", cfg.get("s"))

def test_load_no_section(self) -> None:
cfg = {}
Expand Down

0 comments on commit 04ab5b9

Please sign in to comment.