Checks if the step method is defined correctly. Called by **instruction.checkStep** and by **instruction.setStepMethod( )**.
(self)
| 881 | return |
| 882 | |
| 883 | def checkStepMethod(self): |
| 884 | """ |
| 885 | Checks if the step method is defined correctly. |
| 886 | |
| 887 | Called by **instruction.checkStep** and by **instruction.setStepMethod(<stepMethod>)**. |
| 888 | """ |
| 889 | if self.stepMethod == None: |
| 890 | self.errors += 1 |
| 891 | print("Error: missing step method definition.") |
| 892 | elif type(self.stepMethod) != str: |
| 893 | self.errors += 1 |
| 894 | print("Error: stepMethod should be type 'str'.") |
| 895 | else: |
| 896 | stepMethods = ['lin', 'log', 'list', 'array'] |
| 897 | if self.stepMethod.lower() not in stepMethods: |
| 898 | self.errors += 1 |
| 899 | print("Error: unknown step method '{0}',".format(self.stepMethod)) |
| 900 | else: |
| 901 | self.stepMethod == self.stepMethod.lower() |
| 902 | return |
| 903 | |
| 904 | def setStepStart(self, stepStart): |
| 905 | """ |
no test coverage detected