On Sep 6, 7:44 am, "bambam" <[EMAIL PROTECTED]> wrote: > First, thank you. > > All of the suggestions match what we want to do much better > than what we are doing. We have a script, written in python, > which is doing testing. But the python script doesn't look anything > like the test script, because the python script is written in python, > and the test script is a series of instrument command macros. > > By putting the script sequence into a collection that is separate > from the python code, we will get script list that general engineering > will find much easier to understand: > > def script(self) > def a0010(): global self; self.power_on([self.dev]); > def a0020(): global self; self.dev.addLog([self.name, ' started']); > def a0030(): global self; self.resetMinuteReg([self.dev]); > def a0040(): global self; self.disablePLmessages([self.dev]); > def a0050(): global self; self.dev.testH.writePLram((PL.BCAL12<<8));
Look at generative tests in py.test or nose: they are a much better solution for what you are doing. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list