+ def show_env (self,options, message):
+ if self.options.verbose:
+ utils.header (message)
+ utils.show_options("main options",options)
+
+ def init_steps(self):
+ self.steps_message = 20*'x'+" Defaut steps are\n"+TestPlc.printable_steps(TestPlc.default_steps)
+ self.steps_message += 20*'x'+" Other useful steps are\n"+TestPlc.printable_steps(TestPlc.other_steps)
+
+ def list_steps(self):
+ if not self.options.verbose:
+ print self.steps_message,
+ else:
+ testplc_method_dict = __import__("TestPlc").__dict__['TestPlc'].__dict__
+ scopes = [("Default steps",TestPlc.default_steps)]
+ if self.options.all_steps:
+ scopes.append ( ("Other steps",TestPlc.other_steps) )
+ for (scope,steps) in scopes:
+ print '--------------------',scope
+ for step in [step for step in steps if TestPlc.valid_step(step)]:
+ stepname=step
+ if step.find("force_") == 0:
+ stepname=step.replace("force_","")
+ force=True
+ print '*',step,"\r",4*"\t",
+ try:
+ print testplc_method_dict[stepname].__doc__
+ except:
+ print "*** no doc found"