From cb2ebcc998336f60f78c9dea81453b0771fabe5c Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 29 Oct 2019 15:06:49 +0000 Subject: [PATCH] "round" with ndigits=None returns an integer Trivial-Fix Change-Id: Ic21e34462aabd5cc2aa879ec4f47e2b1bc1dd934 --- neutron/tests/unit/common/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron/tests/unit/common/test_utils.py b/neutron/tests/unit/common/test_utils.py index f8b89334998..5907c905848 100644 --- a/neutron/tests/unit/common/test_utils.py +++ b/neutron/tests/unit/common/test_utils.py @@ -544,13 +544,13 @@ class TimerTestCase(base.BaseTestCase): def test__getattr(self): with utils.Timer() as timer: time.sleep(1) - self.assertEqual(1.0, round(timer.total_seconds(), 0)) + self.assertEqual(1, round(timer.total_seconds())) self.assertEqual(1, timer.delta.seconds) def test__enter_with_timeout(self): with utils.Timer(timeout=10) as timer: time.sleep(1) - self.assertEqual(1.0, round(timer.total_seconds(), 0)) + self.assertEqual(1, round(timer.total_seconds())) def test__enter_with_timeout_exception(self): msg = r'Timer timeout expired after 1 second\(s\).'