From 5e60ee266b3163ef5cfefad910da0251863b27ad Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Fri, 28 Feb 2014 18:41:41 -0800 Subject: [PATCH] assertTrue( a > b ) -> assertGreater( a, b ) for better messages --- mininet/test/test_hifi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mininet/test/test_hifi.py b/mininet/test/test_hifi.py index c9d288b..20ee031 100755 --- a/mininet/test/test_hifi.py +++ b/mininet/test/test_hifi.py @@ -53,8 +53,8 @@ class testOptionsTopoCommon( object ): """Check that a given value is within a tolerance of expected tolerance_frac: less-than-1.0 value; 0.8 would yield 20% tolerance. """ - self.assertTrue( float(measured) >= float(expected) * tolerance_frac ) - self.assertTrue( float(measured) >= float(expected) * tolerance_frac ) + self.assertGreaterEqual( float(measured), + float(expected) * tolerance_frac ) def testCPULimits( self ): "Verify topology creation with CPU limits set for both schedulers." @@ -120,7 +120,7 @@ class testOptionsTopoCommon( object ): for _ in range(REPS): dropped_total += mn.ping(timeout='1') mn.stop() - self.assertTrue(dropped_total > 0) + self.assertGreater( dropped_total, 0 ) def testMostOptions( self ): "Verify topology creation with most link options and CPU limits."