Browse Source

Fix tests for Py3 as well

Yentl Van Tendeloo 5 years ago
parent
commit
8f66390cbb
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/python_sccd/python_sccd_runtime/statecharts_core.py
  2. 1 1
      test/run_tests.py

+ 2 - 2
src/python_sccd/python_sccd_runtime/statecharts_core.py

@@ -1136,7 +1136,7 @@ class RuntimeClassBase(object):
         while self.smallStep():
             self.combo_step.has_stepped = True
         return self.combo_step.has_stepped
-	
+
     # generate transition candidates for current small step
     # @profile
     def generateCandidates(self):
@@ -1151,7 +1151,7 @@ class RuntimeClassBase(object):
         enabledTransitions = []
         for t in transitions:
             if t.isEnabled(enabledEvents, enabledTransitions):
-				enabledTransitions.append(t)
+                enabledTransitions.append(t)
         return enabledTransitions
 
     # @profile

+ 1 - 1
test/run_tests.py

@@ -55,7 +55,7 @@ class PyTestCase(unittest.TestCase):
                     compare_parameters = output_event.getParameters()
                     if len(entry.parameters) != len(compare_parameters) :
                         matches = False
-                    for index in xrange(len(entry.parameters)) :
+                    for index in range(len(entry.parameters)) :
                         if entry.parameters[index] !=  compare_parameters[index]:
                             matches = False