Checks if the number of steps is defined properly. Called by :**instruction.checkStep()** and by **instruction.setStepNum( )**. Also called by and by **instruction.setStepNum( )**.
(self)
| 1017 | return |
| 1018 | |
| 1019 | def checkStepNum(self): |
| 1020 | """ |
| 1021 | Checks if the number of steps is defined properly. |
| 1022 | |
| 1023 | Called by :**instruction.checkStep()** and by **instruction.setStepNum(<stepNum>)**. |
| 1024 | |
| 1025 | Also called by and by **instruction.setStepNum(<stepNum>)**. |
| 1026 | """ |
| 1027 | if self.stepNum == None: |
| 1028 | self.errors += 1 |
| 1029 | print("Error: missing stepNum value.") |
| 1030 | else: |
| 1031 | if type(self.stepNum) == int: |
| 1032 | if self.stepNum <= 0: |
| 1033 | self.errors += 1 |
| 1034 | print("Error: step number must be a positive nonzero integer.") |
| 1035 | else: |
| 1036 | self.errors += 1 |
| 1037 | print("Error: step number type must be 'int'.") |
| 1038 | return |
| 1039 | |
| 1040 | def setStepList(self, stepList): |
| 1041 | """ |
no outgoing calls
no test coverage detected