Skip to content

Instantly share code, notes, and snippets.

@dl6nm
Created October 15, 2020 09:40
Show Gist options
  • Save dl6nm/b3fb6e785c3b42af34ec06793214d53a to your computer and use it in GitHub Desktop.
Save dl6nm/b3fb6e785c3b42af34ec06793214d53a to your computer and use it in GitHub Desktop.
pytest helper class with static method (function) in conftest.py
import pytest
class Helpers:
@staticmethod
def help_me():
return "no"
@pytest.fixture
def helpers():
return Helpers
def test_with_help(helpers):
helpers.help_me()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment