We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Hi,
I'm not python-scripter, but looking at your testmain method
def testmain(): Unit5.Test1() Unit5.Test2(Unit5.Test1)
I guess Unit5.Test1 is going to run two times. Instead of doing above , what happens when you do like below
def testmain(): Unit5.Test2(Unit5.Test1)
Or
def testmain(): panel = Unit5.Test1() Unit5.Test2(panel)
If method is a function, it should be invoked as a function()
def Test2(method):
panel2=method() When it comes to design
you need to ask yourself
Should I use an object oriented approach
Are there common functions - your base class
Then is each test doing some variance of that?
That can be part of an inherited class.
Also one rule of thumb avoid duplicate code whenever possible if you are trying to do similar things.