You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have order, but I want to run test 2 only if test 1 was successful (for instance, in my case running test2 is meaningless, should automatically fail)
The text was updated successfully, but these errors were encountered:
Hi
Unfortunately it does run the test. Here's a brief example:
some_value = None
def test_1():
# some logic here
assert success, "Test should succeed"
global some_value
some_value = success.get_value_to_be_used_in_later_tests()
@depends(after=test_1)
def test_2():
global some_value
if not some_value:
assert False, 'some_value must be set by test_1() before running this test
# use some_value here in test_2
And in my case test_2 is running after the failed test_1 and fails because some_value isn't set.
What I'd like to achieve is the test runner not even attempt to run test_2 so I can remove the check if the value has been set
We have order, but I want to run test 2 only if test 1 was successful (for instance, in my case running test2 is meaningless, should automatically fail)
The text was updated successfully, but these errors were encountered: