PyTest is foremost a unit testing framework. Unit testing frameworks generally have different needs from integration tests, and fortunately PyTest has a means to allow a developer to specify that one test needs to run and complete before another. This is done with the pytest-dependency plugin. Within the code, you will see some of the test cases annotated with dependency markers. To use this plugin, you define which tests can be dependency targets, and for any test that needs to run after it, you define the tests upon which they depend:
@pytest.mark.dependency()def test_kubernetes_components_healthy(kube_v1_client): # iterates through the core kuberneters components to verify the cluster is reporting healthy