Skip to content

Commit c410db3

Browse files
cjcon90facebook-github-bot
authored andcommitted
Update references to TestCase.assertEquals
Summary: assertEquals used to be an alias to assertEqual, but seems the aliases were removed: python/cpython#28268 This is causing some tests to fail with ``` ====================================================================== ERROR: test_set_all_fans_and_read (tests.grandcanyon.test_fans.FansTest.test_set_all_fans_and_read) Test setting all fans speed and read to ensure it is the same ---------------------------------------------------------------------- Traceback (most recent call last): File "/run/tests2/common/base_fans_test.py", line 362, in test_set_all_fans_and_read speed = self.get_speed(data) ^^^^^^^^^^^^^^^^^^^^ File "/run/tests2/common/base_fans_test.py", line 287, in get_speed self.assertEquals(num, self.names[m.group(1)], "Bad fan index") ^^^^^^^^^^^^^^^^^ AttributeError: 'FansTest' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'? ``` Test Plan: Test run on grandcanyon ``` $ netcastle --team openbmc --platform grandcanyon Ran 90 tests in 39 mins 54.908 secs [ ERROR] 0 [ FAILED] 0 [ TIMEOUT] 0 [ PASSED] 70 [ SKIPPED] 20 [ OMITTED] 0 [ RETRIED] 0 2024/02/01 02:36:52.896|522087|MainThread|I|abstract_runner: All tests passed! Reviewed By: lsiudut Differential Revision: D53307151 fbshipit-source-id: 163ef91fd883ca607f6bfdb0b10e756015957e74
1 parent 9ab446e commit c410db3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests2/common/base_fans_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ def get_speed(self, info, fan_id=None):
282282
if m is not None:
283283
self.assertIn(m.group(1), self.names, "Unknown fan name")
284284
if fan_id is not None:
285-
self.assertEquals(fan_id, self.names[m.group(1)], "Bad fan index")
285+
self.assertEqual(fan_id, self.names[m.group(1)], "Bad fan index")
286286
else:
287-
self.assertEquals(num, self.names[m.group(1)], "Bad fan index")
287+
self.assertEqual(num, self.names[m.group(1)], "Bad fan index")
288288
ret.append(int(m.group(3)))
289289
num += 1
290290
return ret

0 commit comments

Comments
 (0)