Skip to content

Commit

Permalink
Revert "[BE] use self.assertEquals instead of str equality in test_ze…
Browse files Browse the repository at this point in the history
…ro1.py (#5364)" (#5366)

This reverts commit 8ada333.
  • Loading branch information
JackCaoG authored and will-cromar committed Sep 14, 2023
1 parent bde253d commit f172dcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_zero1.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ def test_zero1(self):

opt1.step()
opt2.step()
self.assertEquals(opt1.state_dict(), opt2.state_dict()['base'])
assert str(opt1.state_dict()) == str(opt2.state_dict()['base'])

s1 = opt1.state_dict()
s2 = opt2.state_dict()
opt1.load_state_dict(s1)
opt2.load_state_dict(s2)
self.assertEquals(opt1.state_dict(), opt2.state_dict()['base'])
assert str(opt1.state_dict()) == str(opt2.state_dict()['base'])

# step still runnable
opt1.step()
opt2.step()
opt1.load_state_dict(s1)
opt2.load_state_dict(s2)
self.assertEquals(opt1.state_dict(), opt2.state_dict()['base'])
assert str(opt1.state_dict()) == str(opt2.state_dict()['base'])

# step still runnable
opt1.step()
Expand Down

0 comments on commit f172dcd

Please sign in to comment.