Re: how to optimize the below code with a helper function

2016-04-04 Thread Martin A. Brown
Hello again, >(1) Any tips how I can optimize this i.e test case, should have a >helper function that all test cases call. > >(2) Also note that failure.run_tool function can have variable >number of argments how to handle this in the helper function? Here's a little example of how you could

Re: how to optimize the below code with a helper function

2016-04-04 Thread Martin A. Brown
Greetings (again) Ganesh, I notice that you ask about how to optimize the code, but I think what you mean is you want simpler code that is less repetitive and less copy/paste error-prone. Is that correct? Below, I make a few suggestions about how to simplify, although, there probably is furt

how to optimize the below code with a helper function

2016-04-04 Thread Ganesh Pal
Hi Team, Iam on python 2.7.10 and Linux. I have a python function where the similar kind of pattern repeating 100 of times Sample code snippet: test01_log = os.path.join(LOG_DIR, "test01.log") cls.get_baddr['test01'] = failure.run_tool( test01_log, object="inode", offset="1