Skip to content

Commit

Permalink
Fix the simplePrint unittest for python3.
Browse files Browse the repository at this point in the history
To make it running under python2/3 a the same time I had to reduce the
number of items to print.

py2: print (1, 2, 3) => prints the tuple (1, 2, 3)
py3: print(1, 2, 3) => prints the elements: 1, 2, 3

However I have to use the (), because in python3 print is not a
statement anymore.
  • Loading branch information
stephan-hof committed Jun 8, 2017
1 parent 001b98f commit 42905e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Products/PythonScripts/tests/testPythonScript.py
Expand Up @@ -202,7 +202,7 @@ def testFibonacci(self):

def testSimplePrint(self):
res = self._filePS('simple_print')()
self.assertEqual(res, 'a 1 []\n')
self.assertEqual(res, 'a\n')

def testComplexPrint(self):
res = self._filePS('complex_print')()
Expand Down
Binary file modified src/Products/PythonScripts/tests/tscripts/simple_print.ps
Binary file not shown.

0 comments on commit 42905e1

Please sign in to comment.