Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 30c094c8 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[lib] Modern print and utf8 encoding on test files

parent 48440a0d
# -*- coding: utf-8 -*-
## Filename : TestCLUnfolder.py ## Filename : TestCLUnfolder.py
## Author(s) : Michel Le Borgne ## Author(s) : Michel Le Borgne
## Created : 13 sept. 2012 ## Created : 13 sept. 2012
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
''' '''
Unitary Test of the unfolder Unitary Test of the unfolder
''' '''
from __future__ import print_function
import unittest import unittest
...@@ -183,7 +184,7 @@ class ErrorReporter(object): ...@@ -183,7 +184,7 @@ class ErrorReporter(object):
as said as said
""" """
self.error = True self.error = True
#print '\n>> '+mess #print('\n>> '+mess)
class TestCLUnfolder(unittest.TestCase): class TestCLUnfolder(unittest.TestCase):
""" """
......
# -*- coding: utf-8 -*-
## Filename : TestMCLAnalyser.py ## Filename : TestMCLAnalyser.py
## Author(s) : Michel Le Borgne ## Author(s) : Michel Le Borgne
## Created : 03/2012 ## Created : 03/2012
...@@ -567,7 +568,7 @@ class TestMCLAnaLyzer(unittest.TestCase): ...@@ -567,7 +568,7 @@ class TestMCLAnaLyzer(unittest.TestCase):
while True: while True:
try: try:
sim.simul_step() sim.simul_step()
except Exception, exc: except Exception as exc:
exc_txt = exc.__str__() exc_txt = exc.__str__()
self.assert_(exc_txt == 'STOP', "Error: " + exc_txt) self.assert_(exc_txt == 'STOP', "Error: " + exc_txt)
break break
...@@ -604,7 +605,7 @@ class TestMCLAnaLyzer(unittest.TestCase): ...@@ -604,7 +605,7 @@ class TestMCLAnaLyzer(unittest.TestCase):
while True: while True:
try: try:
sim.simul_step() sim.simul_step()
except Exception, exc: except Exception as exc:
exc_txt = exc.__str__() exc_txt = exc.__str__()
self.assert_(exc_txt == 'STOP', "Error: " + exc_txt) self.assert_(exc_txt == 'STOP', "Error: " + exc_txt)
break break
......
# -*- coding: utf-8 -*-
## Filename : TestMCLTranslators.py ## Filename : TestMCLTranslators.py
## Author(s) : Michel Le Borgne ## Author(s) : Michel Le Borgne
## Created : 9 mars 2012 ## Created : 9 mars 2012
...@@ -41,7 +42,7 @@ ...@@ -41,7 +42,7 @@
""" """
Unitary tests for the translators Unitary tests for the translators
""" """
from __future__ import print_function
import unittest import unittest
import sys import sys
...@@ -72,7 +73,7 @@ class ErrorRep(object): ...@@ -72,7 +73,7 @@ class ErrorRep(object):
""" """
self.error = True self.error = True
self.mess += '\n>> '+mess self.mess += '\n>> '+mess
print '\n DISPLAY CALL>> '+mess print('\n DISPLAY CALL>> '+mess)
TRACE_FILE = sys.stdout TRACE_FILE = sys.stdout
#TRACE_FILE = open("/tmp/testMCLTranslator.txt",'w') #TRACE_FILE = open("/tmp/testMCLTranslator.txt",'w')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment