Add more information for test condition failure
This commit is contained in:
@@ -34,8 +34,11 @@ class testLinearBandwidth( unittest.TestCase ):
|
|||||||
bw *= 10 ** 9
|
bw *= 10 ** 9
|
||||||
# check that we have a previous result to compare to
|
# check that we have a previous result to compare to
|
||||||
if n != 1:
|
if n != 1:
|
||||||
self.assertTrue( bw < previous_bw )
|
info = ( 'bw: %d bits/s across %d switches, '
|
||||||
previous_bw = bw
|
'previous: %d bits/s across %d switches' %
|
||||||
|
( bw, n, previous_bw, previous_n ) )
|
||||||
|
self.assertTrue( bw < previous_bw, info )
|
||||||
|
previous_bw, previous_n = bw, n
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user