@@ -865,7 +865,7 @@ class TestGitHubPRGhstackDependencies2(TestCase):
865
865
def test_pr_dependencies (self , * args : Any ) -> None :
866
866
pr = GitHubPR ("pytorch" , "pytorch" , 106068 )
867
867
msg = pr .gen_commit_message (filter_ghstack = True )
868
- assert msg == (
868
+ self . assertEqual ( msg ,
869
869
"[FSDP] Break up `_post_backward_hook` into smaller funcs (#106068)\n \n \n Differential Revision: ["
870
870
"D47852461](https://our.internmc.facebook.com/intern/diff/D47852461)\n Pull Request resolved: "
871
871
"https://github.com/pytorch/pytorch/pull/106068\n Approved by: \n "
@@ -878,7 +878,7 @@ def test_pr_dependencies_ghstack(self, *args: Any) -> None:
878
878
pr = GitHubPR ("pytorch" , "pytorch" , 106068 )
879
879
880
880
msg = pr .gen_commit_message (filter_ghstack = True , ghstack_deps = [pr0 , pr1 , pr2 ])
881
- assert msg == (
881
+ self . assertEqual ( msg ,
882
882
"[FSDP] Break up `_post_backward_hook` into smaller funcs (#106068)\n \n \n Differential Revision: ["
883
883
"D47852461](https://our.internmc.facebook.com/intern/diff/D47852461)\n Pull Request resolved: "
884
884
"https://github.com/pytorch/pytorch/pull/106068\n Approved by: \n "
@@ -931,7 +931,7 @@ def test_merge_ghstack_into(
931
931
mock_repo .cherry_pick .assert_any_call ("rev2" )
932
932
mock_repo .cherry_pick .assert_any_call ("rev123" )
933
933
934
- assert mock .call ("rev1" ) not in mock_repo .cherry_pick .call_args_list
934
+ self . assertTrue ( mock .call ("rev1" ) not in mock_repo .cherry_pick .call_args_list )
935
935
936
936
# Verify the first call
937
937
message = mock_repo .amend_commit_message .call_args_list [0 ].args [0 ]
@@ -944,8 +944,8 @@ def test_merge_ghstack_into(
944
944
"dependencies: #106032, #106033\n "
945
945
)
946
946
947
- assert message .startswith (prefix )
948
- assert message .endswith (suffix )
947
+ self . assertTrue ( message .startswith (prefix ) )
948
+ self . assertTrue ( message .endswith (suffix ) )
949
949
950
950
# Verify the second call
951
951
mock_repo .amend_commit_message .assert_any_call (
0 commit comments