Replace deprecated assertAlmostEquals method
The assertAlmostEquals method has been deprecated since Python 3.2 and was removed in Python 3.12 [1], assertAlmostEqual should be used as the replacement. [1] https://docs.python.org/3.13/whatsnew/3.12.html#removed Change-Id: I1c1be8072e8be6aa5a0e876d08817b1255a31275 Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
This commit is contained in:
parent
7c2b949ce9
commit
77c90bd6bd
@ -192,8 +192,8 @@ class TimeUtilsTest(test_base.BaseTestCase):
|
||||
before = timeutils.utcnow()
|
||||
after = before + datetime.timedelta(days=7, seconds=59,
|
||||
microseconds=123456)
|
||||
self.assertAlmostEquals(604859.123456,
|
||||
timeutils.delta_seconds(before, after))
|
||||
self.assertAlmostEqual(604859.123456,
|
||||
timeutils.delta_seconds(before, after))
|
||||
|
||||
def test_is_soon(self):
|
||||
expires = timeutils.utcnow() + datetime.timedelta(minutes=5)
|
||||
|
Loading…
x
Reference in New Issue
Block a user