Jun-03-2019, 01:41 PM
Hello,
Here is the code and the question:
How can I write the if condition in pythonic way?
I know it may look weird but we have a large suite of tests and the way that the framework is built we don't have other options for what we need right now so this would fit our needs.
Note that addProduct() returns either true either an 'errorText' . This is how it need it.
Thanks.
Here is the code and the question:
t1 = addProduct1() t2 = addProduct2() ... t25 = addProduct25() if t1 or t2 or ... t25 is not True: assert False
How can I write the if condition in pythonic way?
I know it may look weird but we have a large suite of tests and the way that the framework is built we don't have other options for what we need right now so this would fit our needs.
Note that addProduct() returns either true either an 'errorText' . This is how it need it.
Thanks.