Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 95d3066

Browse files
committed
Merge pull request #364 from dawagner/python3-compatibility
Python scripts: Better python3.x compatibility Run the "2to3" script on more of the test scripts.
2 parents e65c400 + 1376ab0 commit 95d3066

39 files changed

+65
-90
lines changed

test/functional-tests-legacy/PfwTestCase/Domains/tDomain_Configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def test_Conf_Deletion_Error(self):
308308
- no configuration created
309309
- existent configurations not affected by error
310310
"""
311-
print self.test_Conf_Renaming_Error.__doc__
311+
print(self.test_Conf_Renaming_Error.__doc__)
312312
# New domain creation for testing purpose
313313
log.I("New domain creation for testing purpose : %s" % (self.domain_name))
314314
log.I("command [createDomain]")

test/functional-tests-legacy/PfwTestCase/Functions/tFunction_Export_Import_Domains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
- Testing import errors
4747
- Testing export errors
4848
"""
49-
import os, commands
49+
import os
5050
import unittest
5151
from Util.PfwUnitTestLib import PfwTestCase
5252
from Util import ACTLogging

test/functional-tests-legacy/PfwTestCase/Functions/tFunction_Sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
- Testing sync nominal case
4545
- Testing errors
4646
"""
47-
import commands, os
47+
import os
4848
import unittest
4949
from Util.PfwUnitTestLib import PfwTestCase
5050
from Util import ACTLogging

test/functional-tests-legacy/PfwTestCase/Functions/tFunction_getParameter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ def test_Function_Commands_Errors(self):
7171
#Get undefined parameter value
7272
log.I("Get undefined parameter value")
7373
out, err = self.pfw.sendCmd("getParameter", "Undefined_parameter", expectSuccess=False)
74-
print str(out)
74+
print(str(out))
7575
assert err == None, "Error when getting parameter : %s" % (err)
7676
assert out != "Done", "Error not detected when getting an undefined parameter"

test/functional-tests-legacy/PfwTestCase/Functions/tFunction_listingFunctions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
- Testing dumpDomains function on nominal case
4242
- Testing dumpElements function on nominal case
4343
"""
44-
import commands, os
44+
import os
4545
import unittest
4646
from Util.PfwUnitTestLib import PfwTestCase
4747
from Util import ACTLogging

test/functional-tests-legacy/PfwTestCase/Types/tBit_Block.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"""
5656

5757
import os
58-
import commands
5958
import unittest
6059
from Util.PfwUnitTestLib import PfwTestCase
6160
from Util import ACTLogging

test/functional-tests-legacy/PfwTestCase/Types/tBoolean.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def testBooleanNegative(self):
126126
~~~~~~~~~~~~~~~~~
127127
- Error detected, boolean not updated
128128
"""
129-
print self.testBooleanNegative.__doc__
129+
print(self.testBooleanNegative.__doc__)
130130
value = "-1"
131131
out, err = self.pfw.sendCmd("setParameter", self.param_name, value, expectSuccess=False)
132132
assert err == None, log.E("When setting parameter %s : %s" % (self.param_name, err))
@@ -152,7 +152,7 @@ def testBooleanOverflow(self):
152152
~~~~~~~~~~~~~~~~~
153153
- Error detected, boolean not updated
154154
"""
155-
print self.testBooleanOverflow.__doc__
155+
print(self.testBooleanOverflow.__doc__)
156156
value = "2"
157157
out, err = self.pfw.sendCmd("setParameter", self.param_name, value, expectSuccess=False)
158158
assert err == None, log.E("When setting parameter %s : %s" % (self.param_name, err))

test/functional-tests-legacy/PfwTestCase/Types/tEnum.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
- Enum parameter undefined value = UNDEF
5252
"""
5353
import os
54-
import commands
5554
from Util.PfwUnitTestLib import PfwTestCase
5655
from Util import ACTLogging
5756
log=ACTLogging.Logger()

test/functional-tests-legacy/PfwTestCase/Types/tFP16_Q0_15.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
- FP16_Q0.15 parameter in nominal case = 0.2453
5353
"""
5454
import os
55-
import commands
5655
from Util.PfwUnitTestLib import PfwTestCase
5756
from Util import ACTLogging
5857
log=ACTLogging.Logger()

test/functional-tests-legacy/PfwTestCase/Types/tFP16_Q15_0.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
- FP16_Q15.0 parameter in nominal case = 2222
5353
"""
5454
import os
55-
import commands
5655
from Util.PfwUnitTestLib import PfwTestCase
5756
from Util import ACTLogging
5857
log=ACTLogging.Logger()

0 commit comments

Comments
 (0)