[ONOS-7039] [ONOS-7044] Fix PEP8 Warnings in TestON
Change-Id: Ied79ff9caff5487a6df50466307f757468d7ca3a
diff --git a/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py b/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
index 0bafefb..c139d48 100644
--- a/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
+++ b/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
@@ -22,13 +22,13 @@
main.case( "pre-condition for cbench test." )
try:
- if type( init ) is not bool:
+ if not isinstance( init, bool ):
init = False
except NameError:
init = False
# -- INIT SECTION, ONLY RUNS ONCE -- #
- if init == False:
+ if not init:
init = True
try:
from tests.dependencies.ONOSSetup import ONOSSetup
@@ -80,7 +80,6 @@
onpass="Successfully configure onos for cbench test ",
onfail="Failed to configure onos for cbench test" )
-
def CASE2( self, main ):
main.case( "Running Cbench" )
main.step( "Issuing cbench commands and grab returned results" )
@@ -119,7 +118,7 @@
main.log.info( "Standard Deviation: \t" + stdev )
try:
- dbFileName="/tmp/CbenchDB"
+ dbFileName = "/tmp/CbenchDB"
dbfile = open( dbFileName, "w+" )
temp = "'" + main.commit + "',"
temp += "'" + mode + "',"
@@ -133,7 +132,7 @@
stepResult = main.TRUE
break
- if ( validFlag == False ):
+ if not validFlag:
main.log.warn( "Cbench Test produced no valid results!!!!" )
stepResult = main.FALSE
@@ -141,4 +140,3 @@
actual=stepResult,
onpass="Successfully tested onos for cbench. ",
onfail="Failed to obtain valid onos cbench result!" )
-