blob: 8b92b6f41aa124d5dfc4958f9f2eff811b56d4d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
Subject: [PATCH] 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
Upstream: https://review.opendev.org/c/openstack/oslo.utils/+/886725
diff --git a/oslo_utils/tests/test_timeutils.py b/oslo_utils/tests/test_timeutils.py
index 98194f1..390d037 100644
--- a/oslo_utils/tests/test_timeutils.py
+++ b/oslo_utils/tests/test_timeutils.py
@@ -192,7 +192,7 @@ class TimeUtilsTest(test_base.BaseTestCase):
before = timeutils.utcnow()
after = before + datetime.timedelta(days=7, seconds=59,
microseconds=123456)
- self.assertAlmostEquals(604859.123456,
+ self.assertAlmostEqual(604859.123456,
timeutils.delta_seconds(before, after))
def test_is_soon(self):
--
2.39.3
|