If the goal is to conditionally skip, pytest provides the `skip` method for this occasion:
`pytest.skip('message')`

I think that skipping tests like this is almost never what we want to do, though. If the appliance isn't in a valid state for running a test and can't be put in the required state, that test should probably fail.