Domanda

I have a jira-pytest pluging. I want to generate runtests.py script containing that plugin. How it can be done?

È stato utile?

Soluzione

Unfortunately the generate function does not currently bundle plugins as far as I know. One could work around this by vendoring the plugin (or as it sounds like in this case the plugin is already shipped) and then enabling it in a conftest.py using the pytest_plugins variable. If the plugin is on the PYTHONPATH (which it will be if it is in the same directory as the module/package being tested) then py.test will import and enable it. See http://pytest.org/latest/plugins.html#requiring-loading-plugins-in-a-test-module-or-conftest-file in the documentation for details of this.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top