MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / checkStepMethod

Method checkStepMethod

SLiCAP/SLiCAPinstruction.py:883–902  ·  view source on GitHub ↗

Checks if the step method is defined correctly. Called by **instruction.checkStep** and by **instruction.setStepMethod( )**.

(self)

Source from the content-addressed store, hash-verified

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 """

Callers 2

setStepMethodMethod · 0.95
checkStepMethod · 0.95

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected