pytest fixture
#11943
Replies: 1 comment
-
Without more context we can't give a reasonable answer |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to invoke a pytest fixture on conditions?
I have defined this fixture to install and delete a helm chart. I have a config.yaml where I define one boolean value.
@pytest.fixture()
def install_and_delete_certmanager_chart():
override_file = "common/certmanager_override_files/cert.yaml"
asyncio.run(install_certmanager_chart(override_file))
yield
uninstall_certmanager_namespace()
This fixture need to be invoked only when the boolean value is true. How can I achieve this ?
test case
def test_http_status(install_and_delete_certmanager_chart):
pass
Beta Was this translation helpful? Give feedback.
All reactions