3

I made a new plugin using this repo with cookiecutter and i want to use another plugin from it.

for example: when I run pytest --useplugin

this should run :pytest --anotherplugin=12345 --useplugin

(more command line arguments run in the background.)

I didn't find anything in pytest documentation.

thanks!

1 Answers1

0

Your best bet is to see whether anotherplugin provides a pytest hook for you to use. If it does, you can use following in your code:

@pytest.mark.optionalhook 
def optional_hook_name

If it does not provide a hook, you may have to use suitable pytest hooks to pass relevant arguments. Be cautious, passing argument to another plugin using unsuitable pytest hooks may sometime cause race around condition.

SilentGuy
  • 1,867
  • 17
  • 27